PDA

View Full Version : QGLWidget::updateGL( )



ToddAtWSU
31st October 2006, 21:33
I have a list of QGLWidgets that I need to refresh at the same time. So I created a for-loop and called updateGL for each of my QGLWidgets. Unfortunately, I never get into my paintGL( ) function of the QGLWidget. I have a print statement before the call to updateGL( ) and after the call and also my first line in paintGL( ) inside my QGLWidget object class. The calls around the paintGL( ) function are being printed but not the statement inside the paintGL( ) call. I have run the debugger and it appears that the call to isValid( ) inside glDraw( ) is returning false even though I never see it actually get to the line return, which it should do if it fails the if-statement. :o Does anyone have any ideas why I am never getting inside my paintGL function call? Thanks for all your help!

e8johan
2nd November 2006, 08:20
Perhaps this helps: http://doc.trolltech.com/qq/qq06-glimpsing.html

ToddAtWSU
2nd November 2006, 19:21
That didn't fix it but I discovered that my initGL( ) call was never taking me into my initializeGL( ) function. I was setting the QGLFormat inside my constructor before making the glInit( ) call and for some reason this kept glInit( ) from entering initializeGL( ). I took moved the QGLFormat setup stuff from my constructor to initializeGL( ) and this allowed a context to be created by Qt and all of the drawing to appear. Thanks for your help. It got me looking into the right area but was not the actual solution!