<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div>Hi everyone,</div><div>I'm new and I'm starting to work on VTK.</div><div><br data-mce-bogus="1"></div><div>////    CONTEXT</div><div><br data-mce-bogus="1"></div><div>We use VTK with OpenGL2 (don't ask me why, it's not mandatory, it was choosen by a previous developper).<br><br>I've made a Pipeline made like this:</div><div><br data-mce-bogus="1"></div><div>2D data image   =>   vtkImageMagnitude  => vtkImageDataGeometryFilter  =>  vtkWarpScalar => vtkMergeFilter (geometry)  => Actor</div><div>                                                                   =========================================> <span style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; display: inline !important; float: none;" data-mce-style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; display: inline !important; float: none;">vtkMergeFilter (Scalars)</span></div><div><span style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; display: inline !important; float: none;" data-mce-style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; display: inline !important; float: none;"><br data-mce-bogus="1"></span></div><div><span style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; display: inline !important; float: none;" data-mce-style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; display: inline !important; float: none;">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.</span></div><div><span style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; display: inline !important; float: none;" data-mce-style="color: #000000; font-family: arial, helvetica, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; display: inline !important; float: none;"><br data-mce-bogus="1"></span></div><div>My image actor is included in a Renderer, with an cubeAxesActor, a ScalarBar and  a LegendScaleActor.</div><div><br data-mce-bogus="1"></div><div>All pipeline objects are started one time at the start.</div><div><br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>////    PROBLEM</div><div><br data-mce-bogus="1"></div><div>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:</div><div><br data-mce-bogus="1"></div><div>vtkOpenGLRenderer (0537D740): failed after Clear 16 OpenGL errors detected<br> 0 : (1282) Invalid operation<br> 1 : (1282) Invalid operation<br> 2 : (1282) Invalid operation<br> 3 : (1282) Invalid operation<br> 4 : (1282) Invalid operation<br> 5 : (1282) Invalid operation<br> 6 : (1282) Invalid operation<br> 7 : (1282) Invalid operation<br> 8 : (1282) Invalid operation<br> 9 : (1282) Invalid operation<br> 10 : (1282) Invalid operation<br> 11 : (1282) Invalid operation<br> 12 : (1282) Invalid operation<br> 13 : (1282) Invalid operation<br> 14 : (1282) Invalid operation<br> 15 : (1282) Invalid operation<br><br><br>ERROR: In ..\..\..\sources\Rendering\OpenGL2\vtkOpenGLCamera.cxx, line 144<br>vtkOpenGLCamera (053D4D20): failed after Render 16 OpenGL errors detected<br> 0 : (1282) Invalid operation<br> 1 : (1282) Invalid operation<br> 2 : (1282) Invalid operation<br> 3 : (1282) Invalid operation<br> 4 : (1282) Invalid operation<br> 5 : (1282) Invalid operation<br> 6 : (1282) Invalid operation<br> 7 : (1282) Invalid operation<br> 8 : (1282) Invalid operation<br> 9 : (1282) Invalid operation<br> 10 : (1282) Invalid operation<br> 11 : (1282) Invalid operation<br> 12 : (1282) Invalid operation<br> 13 : (1282) Invalid operation<br> 14 : (1282) Invalid operation<br> 15 : (1282) Invalid operation<br><br><br>ERROR: In ..\..\..\sources\Rendering\OpenGL2\vtkOpenGLRenderer.cxx, line 125<br>vtkOpenGLRenderer (0537D740): failed after UpdateLights 16 OpenGL errors detected<br> 0 : (1282) Invalid operation<br> 1 : (1282) Invalid operation<br> 2 : (1282) Invalid operation<br> 3 : (1282) Invalid operation<br> 4 : (1282) Invalid operation<br> 5 : (1282) Invalid operation<br> 6 : (1282) Invalid operation<br> 7 : (1282) Invalid operation<br> 8 : (1282) Invalid operation<br> 9 : (1282) Invalid operation<br> 10 : (1282) Invalid operation<br> 11 : (1282) Invalid operation<br> 12 : (1282) Invalid operation<br> 13 : (1282) Invalid operation<br> 14 : (1282) Invalid operation<br> 15 : (1282) Invalid operation<br><br><br>ERROR: In ..\..\..\sources\Rendering\OpenGL2\vtkOpenGLProperty.cxx, line 91<br>vtkOpenGLProperty (05A061E8): failed after Render 16 OpenGL errors detected<br> 0 : (1282) Invalid operation<br> 1 : (1282) Invalid operation<br> 2 : (1282) Invalid operation<br> 3 : (1282) Invalid operation<br> 4 : (1282) Invalid operation<br> 5 : (1282) Invalid operation<br> 6 : (1282) Invalid operation<br> 7 : (1282) Invalid operation<br> 8 : (1282) Invalid operation<br> 9 : (1282) Invalid operation<br> 10 : (1282) Invalid operation<br> 11 : (1282) Invalid operation<br> 12 : (1282) Invalid operation<br> 13 : (1282) Invalid operation<br> 14 : (1282) Invalid operation<br> 15 : (1282) Invalid operation<br></div><div><br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>The error happens at this line :</div><div><br data-mce-bogus="1"></div><div style="padding-left: 30px;"> if (this->TimerQuery == 0)<br> {<br>   glGenQueries(1, static_cast<GLuint*>(&this->TimerQuery));<br> }</div><div style="padding-left: 30px;"><br data-mce-bogus="1"></div><div style="">If you want my code, you can ask me.</div><div style=""><br data-mce-bogus="1"></div><div style="">I think it's just a newbie problem, but I don't find anything on it.</div><div style=""><br data-mce-bogus="1"></div><div style="">Best regards</div><div style="">Romain</div></div></body></html>