Results 1 to 4 of 4

Thread: openGL: pbuffer in thread and nvidia

  1. #1
    Join Date
    Jun 2010
    Posts
    11
    Qt products
    Qt4
    Platforms
    Windows

    Default openGL: pbuffer in thread and nvidia

    hi

    i have a programm which creates a pbuffer. i am starting a thread and using this pbuffer to render a scene and saving it a dynamic texture.
    the application accesses this texture to draw it. i am using this to achieve asynchronous rendering.

    PROBLEM:
    using this method with ATI graphiccards work fine.
    but using nvidia graphiccards the scene is only rendered once. any further manipulation does not affect the dynamic texture. it seems that the pbuffer can only be written once.
    once i remove threading (but keep every as is) it will work fine.

    anyone can help ?

    Qt 4.6.2
    windows (tested: XP, vista, 7)
    nvidia (tested one 3 different cards)

  2. #2
    Join Date
    Jun 2010
    Posts
    11
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: openGL: pbuffer in thread and nvidia

    noone got any idea ?

  3. #3
    Join Date
    Mar 2008
    Posts
    11
    Thanks
    1
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: openGL: pbuffer in thread and nvidia

    How are you updating the pbuffer from other threads, specifically, are you trying to allocate textures in those other threads and render to the pbuffer because it may be something specific with pbuffers and nvidia's opengl impl where things which receive device id's such as texture id's or glx ids can only be created in the main thread but manipulated from others, if you are creating them from other threads typically this crashes the thread.

  4. #4
    Join Date
    Jun 2010
    Posts
    11
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: openGL: pbuffer in thread and nvidia

    the pbuffer is created and initialized with oGL settings in the main thread. it is also bound to a dynamic texture in the main thread.
    the thread does:
    - switch context to pbuffer (main thread will not get context until rendering is done: locked)
    - render scene
    - update dynamic texture (if auto update is not available) (also tried to force an update)

    once the thread is done the main thread will print the scene:
    - switch context to main
    - print dynamic texture

    btw:
    the thread never crashes

Similar Threads

  1. NVIDIA CUDA + Qt
    By redscorp in forum Qt Programming
    Replies: 3
    Last Post: 24th October 2010, 17:35
  2. Replies: 0
    Last Post: 16th March 2010, 02:13
  3. OpenGL in thread
    By c0deland in forum Newbie
    Replies: 5
    Last Post: 3rd December 2009, 00:32
  4. QT + OpenGL + Thread => aaaahhhhh !
    By anthibug in forum Qt Programming
    Replies: 7
    Last Post: 26th July 2008, 13:36
  5. QGLWidget, ATI & NVIDIA
    By pir in forum Qt Programming
    Replies: 3
    Last Post: 12th September 2006, 12:06

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.