[vtkusers] Conflict VTK and QGLViewer
Ralph Brecheisen
ralph.brecheisen at gmail.com
Wed Jun 22 05:43:46 EDT 2011
Hi,
We're developing a research tool that uses QVTKWidget to integrate VTK
rendering in a Qt application. For this application, I'm currently working
on a widget that extends from QGLViewer. In this widget I want to display a
2D map of floats (a 256x128 height field). Since I cannot find a way to do
this in Qt with either QPixmap or QImage (they both require specific image
formats which I don't have) I'm using OpenGL to do this. This works fine
except for the fact that it messes up depth sorting and face culling in the
vtkRenderer of the QVTKWidget. For some reason, the GL context in the
QGLViewer is left in an unknown state which confuses the VTK rendering.
In the QGLWidget I'm trying to keep the OpenGL-specific render statements
together in a single function and call glPushAttrib( GL_ALL_ATTRIB_BITS )
and glPopAttrib() at the beginning and end. I'm also pushing and popping all
transformation matrices. Still I'm getting these rendering problems in VTK.
If I don't create the GL widget, everythings works fine.
Any idea how I could solve this?
Thanks!
Ralph
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110622/44deb2d9/attachment.htm>
More information about the vtkusers
mailing list