[vtkusers] QT VTK OpenGL errors

Thales Luis Rodrigues Sabino tluisrs at gmail.com
Tue Nov 1 19:19:13 EDT 2016


This looks like an OpenGL resource sharing issue. I don't know exactly how
VTK handles multiples windows in a Qt application but it looks like it is
trying to bind a texture that is not registered in a certain context.

Can tell if this happens when you have a single window or this happens only
when you add a second window?

On Tue, Nov 1, 2016 at 8:15 PM, Mike Withascarf via vtkusers <
vtkusers at vtk.org> wrote:

> I'm using QT with VTK for a fairly complex application. Everything works
> fine
> normally, but if I try to use a function to 'clear' the QVTKWidget, and
> then
> add a new pipeline, I run into lots of OpenGL errors. What would be the
> appropriate way to clear the window/renderer? Here is the code I've been
> trying, where window is of type QVTKWidget:
>
> vtkSmartPointer<vtkRenderer> ren_old =
> window->GetRenderWindow()->GetRenderers()->GetFirstRenderer();
> if (ren_old) ren_old->RemoveAllViewProps(); // Remove the pipeline from
> renderer
> if (window->isVisible() && window->GetRenderWindow()->IsDrawable())
> window->GetRenderWindow()->Render(); // Update the window so it is blank
> if (ren_old) window->GetRenderWindow()->RemoveRenderer(ren_old); // Remove
> the renderer
>
>
>
> I'm using multiple QVTKWidgets in one app, and each might have a pipeline
> that connects either with vtkImageViewer2 or a normal vtkRenderer. Here are
> the OpenGL errors reported in the vtkOutputWindow:
>
> ERROR: In C:\vtk\src\Rendering\OpenGL2\vtkTextureObject.cxx, line 540
> vtkTextureObject (0000029AC7337C70): failed at glBindTexture 1 OpenGL
> errors
> detected
>   0 : (1282) Invalid operation
>
>
> ERROR: In C:\vtk\src\Rendering\OpenGL2\vtkTextureObject.cxx, line 554
> vtkTextureObject (0000029AC7337C70): failed at glBindTexture(0) 1 OpenGL
> errors detected
>   0 : (1282) Invalid operation
>
>
> ERROR: In C:\vtk\src\Rendering\OpenGL2\vtkTextureObject.cxx, line 540
> vtkTextureObject (0000029AC7337C70): failed at glBindTexture 1 OpenGL
> errors
> detected
>   0 : (1282) Invalid operation
>
>
> ERROR: In C:\vtk\src\Rendering\OpenGL2\vtkTextureObject.cxx, line 554
> vtkTextureObject (0000029AC7337C70): failed at glBindTexture(0) 1 OpenGL
> errors detected
>   0 : (1282) Invalid operation
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/
> opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
>


-- 
Thales Luis Rodrigues Sabino

PhD Student at PGMC-UFJF <http://www.ufjf.br/pgmc/>
Lattes <http://lattes.cnpq.br/0601030410417146> | LinkedIn
<https://br.linkedin.com/in/tluisrs> | ResearchGate
<https://www.researchgate.net/profile/Thales_Luis_Sabino>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20161101/8434319b/attachment.html>


More information about the vtkusers mailing list