Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: Strange delay when executing glTexImage2D with vsync on

  1. #11
    Junior Member Newbie
    Join Date
    Nov 2013
    Posts
    5
    Quote Originally Posted by Dark Photon View Post
    Sounds like updateGL() is doing a swap and finish.

    Random websearch hit:

    * http://qt-project.org/doc/qt-4.8/QGLWidget.html

    Read the "buffer swap" references in here. Apparently you can use setAutoBufferSwap() to control whether an internal swap is done, and one is done by default. In any case, you only need one swap per double-buffered drawable.



    Yep, that's consistent with two swaps being in there.
    But if I remove the buffer swap from updateGL, then where is the buffer supposed to swap? If I put setAutoBufferSwap(false) the timer takes only 1 ms, but then I don't get any picture on the widget because the buffers aren't swapped anywhere. You think that in my code there are two swaps? Then there is no other explanation than updateGL itself calling for swapBuffers twice, because I don't have any buffer swap calls in my code other than updateGL.

  2. #12
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Location
    Druidia
    Posts
    3,124
    You think that in my code there are two swaps? Then there is no other explanation than updateGL itself calling for swapBuffers twice...
    There are other possibilities, but are less likely. 1) You could have a call to wgl/glXSwapInterval(2) in your code, or 2) your monitor/GPU could be negotiating a 30Hz refresh rather than a 60Hz refresh.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •