Results 1 to 3 of 3

Thread: OpenGL rendering and threads

  1. #1
    Join Date
    Feb 2006
    Location
    US
    Posts
    173
    Thanks
    16
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows Android

    Default OpenGL rendering and threads

    Hello,

    Do OpenGL calls have to be issued in the main thread (e.g. the same thread as the QGLWidget)?

    I know the cull traversal and the render-graph generation can be done in a separate thread. Then the render-graph could be processed in the main thread if needed (e.g. in QGLWidget::paintGL).

    Much thanks,
    Ben

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: OpenGL rendering and threads

    Qt docs say that QGLContext isn't thread safe, so I'm not sure if you can find a way to safely activate the context in another thread.

  3. #3
    Join Date
    Jul 2008
    Posts
    10
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: OpenGL rendering and threads

    I found something very interesting about that : http://apsy.gse.uni-magdeburg.de/mai...edcube&lang=de

    The examples provided work great (i tried the qt 4.4 example without any problem).

    Unfortunately it's in deutch, but code comments are in english if I remember.

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.