[vtk-developers] Error on glGenQueries

Romain CENDRE romain.cendre at optopartner.com
Mon Dec 19 04:01:09 EST 2016


Hi everyone, 
I'm new and I'm starting to work on VTK. 

//// CONTEXT 

We use VTK with OpenGL2 (don't ask me why, it's not mandatory, it was choosen by a previous developper). 

I've made a Pipeline made like this: 

2D data image => vtkImageMagnitude => vtkImageDataGeometryFilter => vtkWarpScalar => vtkMergeFilter (geometry) => Actor 
=========================================> vtkMergeFilter (Scalars) 

I keep a reference on vtkImageMagnitude to change image data stored inside, hope that all the pipe refresh itself and it seems to work at this time. 

My image actor is included in a Renderer, with an cubeAxesActor, a ScalarBar and a LegendScaleActor. 

All pipeline objects are started one time at the start. 


//// PROBLEM 

My problem is when I want to change my camera location (to get a 2D view) and call Render() on the renderer to refresh scene I get the following error: 

vtkOpenGLRenderer (0537D740): failed after Clear 16 OpenGL errors detected 
0 : (1282) Invalid operation 
1 : (1282) Invalid operation 
2 : (1282) Invalid operation 
3 : (1282) Invalid operation 
4 : (1282) Invalid operation 
5 : (1282) Invalid operation 
6 : (1282) Invalid operation 
7 : (1282) Invalid operation 
8 : (1282) Invalid operation 
9 : (1282) Invalid operation 
10 : (1282) Invalid operation 
11 : (1282) Invalid operation 
12 : (1282) Invalid operation 
13 : (1282) Invalid operation 
14 : (1282) Invalid operation 
15 : (1282) Invalid operation 


ERROR: In ..\..\..\sources\Rendering\OpenGL2\vtkOpenGLCamera.cxx, line 144 
vtkOpenGLCamera (053D4D20): failed after Render 16 OpenGL errors detected 
0 : (1282) Invalid operation 
1 : (1282) Invalid operation 
2 : (1282) Invalid operation 
3 : (1282) Invalid operation 
4 : (1282) Invalid operation 
5 : (1282) Invalid operation 
6 : (1282) Invalid operation 
7 : (1282) Invalid operation 
8 : (1282) Invalid operation 
9 : (1282) Invalid operation 
10 : (1282) Invalid operation 
11 : (1282) Invalid operation 
12 : (1282) Invalid operation 
13 : (1282) Invalid operation 
14 : (1282) Invalid operation 
15 : (1282) Invalid operation 


ERROR: In ..\..\..\sources\Rendering\OpenGL2\vtkOpenGLRenderer.cxx, line 125 
vtkOpenGLRenderer (0537D740): failed after UpdateLights 16 OpenGL errors detected 
0 : (1282) Invalid operation 
1 : (1282) Invalid operation 
2 : (1282) Invalid operation 
3 : (1282) Invalid operation 
4 : (1282) Invalid operation 
5 : (1282) Invalid operation 
6 : (1282) Invalid operation 
7 : (1282) Invalid operation 
8 : (1282) Invalid operation 
9 : (1282) Invalid operation 
10 : (1282) Invalid operation 
11 : (1282) Invalid operation 
12 : (1282) Invalid operation 
13 : (1282) Invalid operation 
14 : (1282) Invalid operation 
15 : (1282) Invalid operation 


ERROR: In ..\..\..\sources\Rendering\OpenGL2\vtkOpenGLProperty.cxx, line 91 
vtkOpenGLProperty (05A061E8): failed after Render 16 OpenGL errors detected 
0 : (1282) Invalid operation 
1 : (1282) Invalid operation 
2 : (1282) Invalid operation 
3 : (1282) Invalid operation 
4 : (1282) Invalid operation 
5 : (1282) Invalid operation 
6 : (1282) Invalid operation 
7 : (1282) Invalid operation 
8 : (1282) Invalid operation 
9 : (1282) Invalid operation 
10 : (1282) Invalid operation 
11 : (1282) Invalid operation 
12 : (1282) Invalid operation 
13 : (1282) Invalid operation 
14 : (1282) Invalid operation 
15 : (1282) Invalid operation 


The error happens at this line : 

if (this->TimerQuery == 0) 
{ 
glGenQueries(1, static_cast<GLuint*>(&this->TimerQuery)); 
} 

If you want my code, you can ask me. 

I think it's just a newbie problem, but I don't find anything on it. 

Best regards 
Romain 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20161219/7c3aa626/attachment.html>


More information about the vtk-developers mailing list