[vtk-developers] Error on glGenQueries
Romain CENDRE
romain.cendre at optopartner.com
Mon Dec 19 08:29:26 EST 2016
And I'm currently using version 7.1!
De: "Romain CENDRE" <romain.cendre at optopartner.com>
À: "Ken Martin" <ken.martin at kitware.com>
Envoyé: Lundi 19 Décembre 2016 14:28:25
Objet: Re: [vtk-developers] Error on glGenQueries
Hi Ken!
This is my resetView() function:
void QVTKDisplay::resetView()
{
double * bounds = m_actor->GetBounds();
double imageCenterX = 0.5f * (bounds[1] - bounds[0]);
double imageCenterY = 0.5f * (bounds[3] - bounds[2]);
double imageWidth = bounds[1] - bounds[0];
double imageHeight = bounds[3] - bounds[2];
m_renderer->ResetCamera();
m_renderer->GetActiveCamera()->ParallelProjectionOn();
m_renderer->GetActiveCamera()->SetFocalPoint(imageCenterX, imageCenterY, 0.f);
m_renderer->GetActiveCamera()->SetPosition( imageCenterX, imageCenterY, m_renderer->GetActiveCamera()->GetDistance());
m_renderer->GetActiveCamera()->SetViewUp(0, 1, 0);
//m_renderer->Render();
}
I try to keep always the same instance of object, idem for window.
Does it answer to your question?
De: "Ken Martin" <ken.martin at kitware.com>
À: "Romain CENDRE" <romain.cendre at optopartner.com>
Cc: "vtk-developers" <vtk-developers at vtk.org>
Envoyé: Lundi 19 Décembre 2016 14:23:49
Objet: Re: [vtk-developers] Error on glGenQueries
What version of VTK are you using? How do you change your camera? Using the same window or creating a new one?
Ken
On Mon, Dec 19, 2016 at 4:01 AM, Romain CENDRE < romain.cendre at optopartner.com > wrote:
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
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
Search the list archives at: http://markmail.org/search/?q=vtk-developers
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtk-developers
--
Ken Martin PhD
Chairman & CFO
Kitware Inc.
28 Corporate Drive
Clifton Park NY 12065
518 371 3971
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20161219/f70c3318/attachment.html>
More information about the vtk-developers
mailing list