PDA

View Full Version : QT - Opengl - setOrtho



jsmith
26th August 2009, 11:20
hi,
i am creating five QGLWidgets on top of thQ QWidget. For every QGLWidget i am writing initializeGL(), resizeGL(), paintGL().

in resizeGL() i am setting ortho for five QGLWidgets differently. But is not setting correctly for all five. It is working fine only for one QGLWidget. can any one help me why this hapening like this.

here i am sending sample code for two QGLWidgets.

soxs060389
24th September 2009, 17:41
I think you have to use glPushMatrix() and glPopMatrix() to not modify the other GLWidget's Matrix, as OpenGL is a state machine.