While the animation is in progress, I add a delay right after
rendering, hoping to get my framerate down to the monitor's refresh
rate.
However, I was wondering. Is it possible to approximately sync my
render with the beginning of the monitor refresh cycle? This way I can
make sure that I'm not rendering across 2 refresh cycles.
Use the wglSwapIntervalEXT() extension for this.
--
<\___/>
/ O O \
\_____/ FTB.
http://www.topaz3d.com/ - New 3D editor for real time simulation
So if I enable vsync, does it meant that it,
(a) tells the graphics chip not to proceed with a buffer swap until
the refresh cycle is over (This doesnt help me, as I could be
rendering away eating up my cpu. Its just the frames I have rendered
are not gonna show up on the monitor)
or
(b) causes some function of mine, either glFinish or SwapBuffers(dc)
or something to pause my execution until the current refresh cycle is
completed. (This I want! If this is it, which function has the
"pause")
Thanks!
The swapbuffers will stall until the sync is hit, your app won't keep
needlessly going.
jbw
(b)
SwapBuffers() will wait for the refresh.