<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div><br></div><div>And I'm currently using version 7.1! </div><div><br data-mce-bogus="1"></div><hr id="zwchr" data-marker="__DIVIDER__"><div data-marker="__HEADERS__"><b>De: </b>"Romain CENDRE" <romain.cendre@optopartner.com><br><b>À: </b>"Ken Martin" <ken.martin@kitware.com><br><b>Envoyé: </b>Lundi 19 Décembre 2016 14:28:25<br><b>Objet: </b>Re: [vtk-developers] Error on glGenQueries<br></div><br><div data-marker="__QUOTED_TEXT__"><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div>Hi Ken!<br><br></div><div>This is my resetView() function:</div><br><div>void QVTKDisplay::resetView()<br>{ <br> double * bounds = m_actor->GetBounds();<br><br> double imageCenterX = 0.5f * (bounds[1] - bounds[0]);<br> double imageCenterY = 0.5f * (bounds[3] - bounds[2]);<br> double imageWidth = bounds[1] - bounds[0];<br> double imageHeight = bounds[3] - bounds[2];<br><br> m_renderer->ResetCamera();<br> m_renderer->GetActiveCamera()->ParallelProjectionOn();<br> m_renderer->GetActiveCamera()->SetFocalPoint(imageCenterX, imageCenterY, 0.f);<br> m_renderer->GetActiveCamera()->SetPosition( imageCenterX, imageCenterY, m_renderer->GetActiveCamera()->GetDistance());<br> m_renderer->GetActiveCamera()->SetViewUp(0, 1, 0);<br> //m_renderer->Render();<br>}</div><br><div>I try to keep always the same instance of object, idem for window.<br>Does it answer to your question?</div><br><hr id="zwchr"><div><b>De: </b>"Ken Martin" <ken.martin@kitware.com><br><b>À: </b>"Romain CENDRE" <romain.cendre@optopartner.com><br><b>Cc: </b>"vtk-developers" <vtk-developers@vtk.org><br><b>Envoyé: </b>Lundi 19 Décembre 2016 14:23:49<br><b>Objet: </b>Re: [vtk-developers] Error on glGenQueries<br></div><br><div><div dir="ltr">What version of VTK are you using? How do you change your camera? Using the same window or creating a new one?<br><div>Ken</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec 19, 2016 at 4:01 AM, Romain CENDRE <span dir="ltr"><<a href="mailto:romain.cendre@optopartner.com" target="_blank">romain.cendre@optopartner.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><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><br><div>////    CONTEXT</div><br><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><br><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;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing: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;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:#ffffff;display:inline!important;float:none"><br></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;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing: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;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:#ffffff;display:inline!important;float:none"><br></span></div><div>My image actor is included in a Renderer, with an cubeAxesActor, a ScalarBar and  a LegendScaleActor.</div><br><div>All pipeline objects are started one time at the start.</div><br><br><div>////    PROBLEM</div><br><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><br><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><br><br><div>The error happens at this line :</div><br><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></div><div>If you want my code, you can ask me.</div><br><div>I think it's just a newbie problem, but I don't find anything on it.</div><br><div>Best regards</div><span class="HOEnZb"><span style="color: #888888;"><div>Romain</div></span></span></div></div><br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtk-developers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtk-developers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtk-developers" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/vtk-developers</a><br>
<br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">Ken Martin PhD<div>Chairman & CFO<br>Kitware Inc.<br>28 Corporate Drive<br>Clifton Park NY 12065<br>518 371 3971<br><div><span style="font-size:10pt;font-family:Tahoma,sans-serif">This communication,
including all attachments, contains confidential and legally privileged
information, and it is intended only for the use of the addressee.  Access to this email by anyone else is
unauthorized. If you are not the intended recipient, any disclosure, copying,
distribution or any action taken in reliance on it is prohibited and may be
unlawful. If you received this communication in error please notify us
immediately and destroy the original message. 
Thank you.</span></div></div></div>
</div></div></div><br></div></div></body></html>