|
|
#1 | |
|
Registered User
Join Date: Nov 2006
Posts: 2
|
Hello!
I have question for you regarding vblank syncing. I know that if I set the environment variable __GL_SYNC_TO_VBLANK to non-zero value I get my application to sync to the vblank when I go glXSwapBuffers(). Now what I want to do is sync to every other vblank (if the vblank is 60 Hz, I want my application to run at 30 FPS). Initially I thought that this would be easy. My guess was that if I call glXSwapBuffers() with an interval of more that 1000/60 ms I would get an FPS of 30. This seemed reasonable since I get a FPS of 60 if I call glXSwapBuffers() with an interval less than 1000/60 ms. However, for my particular application I get an FPS around 43 (the time it takes to draw all my stuff is ~23 ms). Does anyone here know if there is a way to make the driver always sync to the next vblank, even if my call to glXSwapBuffers() comes a bit late? Regards, Mattias |
|
|
|
|
|
|
#2 | |
|
Registered User
Join Date: Aug 2003
Posts: 14
|
GLX_SGI_swap_control or perhaps GLX_SGI_video_sync?
|
|
|
|
|
|
|
#3 |
|
NVIDIA Corporation
Join Date: Mar 2005
Posts: 2,487
|
Try __GL_SYNC_TO_VBLANK=2
|
|
|
|
|
|
#4 | |
|
Registered User
Join Date: Nov 2006
Posts: 2
|
Thanks. Setting __GL_SYNC_TO_VBLANK=2 works perfectly! I haven't seen it documented anywhere, but it works! :-)
:.:: mattias |
|
|
|
|
![]() |
| Thread Tools | |
|
|