<div dir="ltr">Hi Nick, Richard,<div><br></div><div>It's possible that VTK is being asked to render before Qt is ready. If this is the case, you might be able to fix it by putting guards around the call to Render in QVTKWidget.cxx, i.e. by replacing this (around line 475):</div><div><br></div><div><div> iren->Render();</div></div><div><br></div><div>with this:</div><div><br></div><div> if (updatesEnabled() && isVisible())</div><div> {</div><div> iren->Render();</div><div> }</div><div><br></div><div>I'm not sure if it will work, but it might be worth a try.</div><div><br></div><div> - David</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Nov 29, 2014 at 11:01 AM, Nick Patterson <span dir="ltr"><<a href="mailto:pattersonnp@gmail.com" target="_blank">pattersonnp@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I similarly see this problem and and have not yet found the resolution. Information at the bottom of the page associated with:-<br>
<br>
<a href="http://www.vtk.org/Wiki/VTK/OpenGL_Errors" target="_blank">http://www.vtk.org/Wiki/VTK/OpenGL_Errors</a><br>
<br>
highlights this Mac specific problem, but is next to useless in actually explaining the problem since they don’t indicate exactly what is meant by “restructure your code”.<br>
<br>
If you find a solution, please let me know.<br>
<span class="HOEnZb"><font color="#888888"><br>
Nick.<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
> On 28 Nov 2014, at 11:46, mbcx9rb9 <<a href="mailto:richard.j.brown@live.co.uk">richard.j.brown@live.co.uk</a>> wrote:<br>
><br>
> I am creating a DICOM viewer, which works fine on my Mac Thunderbolt display<br>
> but on my Macbook Pro 15" screen, the ImageViewer only fills the bottom<br>
> ~quarter of the QVTKWidget. The relevant part of my code looks like this:<br>
><br>
> * imageViewer->SetInputConnection(reader->GetOutputPort());<br>
> imageViewer->SetRenderWindow(qvtk->GetRenderWindow());<br>
> imageViewer->Render();<br>
> qvtk->show();*<br>
><br>
> I also get these errors showing, but they do not cause the program to crash<br>
> (and only display for the first object I render for each run of the<br>
> program):<br>
><br>
> *ERROR: In<br>
> /Users/CRCT_Richard/Downloads/VTK-6.1.0/Rendering/OpenGL/vtkOpenGLRenderer.cxx,<br>
> line 1202<br>
> vtkOpenGLRenderer (0x10b284b60): failed after Clear 1 OpenGL errors detected<br>
> 0 : (1286) Invalid framebuffer operation<br>
><br>
><br>
> ERROR: In<br>
> /Users/CRCT_Richard/Downloads/VTK-6.1.0/Rendering/OpenGL/vtkOpenGLImageSliceMapper.cxx,<br>
> line 574<br>
> vtkOpenGLImageSliceMapper (0x10b280be0): failed after RenderPolygon 1 OpenGL<br>
> errors detected<br>
> 0 : (1286) Invalid framebuffer operation<br>
><br>
><br>
> ERROR: In<br>
> /Users/CRCT_Richard/Downloads/VTK-6.1.0/Rendering/OpenGL/vtkOpenGLImageSliceMapper.cxx,<br>
> line 574<br>
> vtkOpenGLImageSliceMapper (0x10b280be0): failed after RenderPolygon 1 OpenGL<br>
> errors detected<br>
> 0 : (1286) Invalid framebuffer operation*<br>
><br>
> Not sure if the two errors are linked, but any help would be appreciated.<br>
> Thanks<br>
><br>
><br>
><br>
> --<br>
> View this message in context: <a href="http://vtk.1045678.n5.nabble.com/imageViewer-size-within-QVTKWidget-tp5729578.html" target="_blank">http://vtk.1045678.n5.nabble.com/imageViewer-size-within-QVTKWidget-tp5729578.html</a><br>
> Sent from the VTK - Users mailing list archive at Nabble.com.<br>
> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://public.kitware.com/mailman/listinfo/vtkusers" target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a><br>
<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a><br>
</div></div></blockquote></div><br></div>