Page 1 of 1

Does FlipBuffers block?

Posted: Thu May 30, 2013 1:17 pm
by Kruno
I can simply use a timer to simulate the draw fps, but the answer to this question could save me 30 seconds worth of effort.

Re: Does FlipBuffers block?

Posted: Thu May 30, 2013 1:55 pm
by Kruno
Just found out that it indeed does block. I timed it myself.

Time to remove the FPS counter and add my own timers.

Thanks EllapsedMilliseconds! :)

Re: Does FlipBuffers block?

Posted: Thu May 30, 2013 10:47 pm
by flood
FlipBuffers() blocks to wait for a vblank if vsync is enabled. I'm not sure what you're getting at here when it comes to your FPS counter.

Re: Does FlipBuffers block?

Posted: Fri May 31, 2013 7:24 am
by Kruno
flood wrote:FlipBuffers() blocks to wait for a vblank if vsync is enabled. I'm not sure what you're getting at here when it comes to your FPS counter.
I was checking to see how long the event loop is taking. It was 66ms and I wondered why. I set the frame rate to 15fps. I just used the timer to tick off when to render instead of using a frame limiter so my logic can run as fast as possible. Basically rendering should occur every 66ms and not the logic.