Results 1 to 3 of 3

Thread: QGLWidget::updateGL( )

  1. #1
    Join Date
    Jan 2006
    Location
    Ohio
    Posts
    332
    Thanks
    37
    Thanked 8 Times in 4 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Unhappy QGLWidget::updateGL( )

    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. Does anyone have any ideas why I am never getting inside my paintGL function call? Thanks for all your help!

  2. #2
    Join Date
    Jan 2006
    Location
    Alingsås, Sweden
    Posts
    437
    Thanks
    3
    Thanked 39 Times in 39 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QGLWidget::updateGL( )


  3. The following user says thank you to e8johan for this useful post:

    ToddAtWSU (2nd November 2006)

  4. #3
    Join Date
    Jan 2006
    Location
    Ohio
    Posts
    332
    Thanks
    37
    Thanked 8 Times in 4 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QGLWidget::updateGL( )

    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!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.