Flip False ?

Archives Forums/Win32 Discussion/Flip False ?

Paul "Taiphoz"(Posted 2005) [#1]
How do I do flip false ?/?????

FoRcE(Posted 2005) [#2]

Paul "Taiphoz"(Posted 2005) [#3]
Thanks m8

flying willy(Posted 2005) [#4]
You only need to do it once after Graphics, not every loop.

xlsior(Posted 2005) [#5]
On my Radeon 9600 this works OK (clocked FPS increases to between 800 and 1000 in the app I'm working on) but I see absolutely no change on my other computer, which uses an on-board graphics adapter.

(VIA/S3G KM400/KN400 onboard graphic adapter, Soyo motherboard)

Clocked FPS stays exactly at the specified Hz on that one

Still great for measuring the efficiency of things though - Simply using FRAPS to put a nice overlay FPS counter in the top of the screen, easy to spot differences when the refresh rate isn't smoothing things out.

By the way: It looks like only the (0) value makes any difference -- any other value, and the framerate reverts back to the one specified by the Graphics command.

Tracer(Posted 2005) [#6]
Gets better, bglSetSwapInterval(1) slows my Geforce 6800 Ultra down to a crawl with OpenGL code (PC runs normal speed, the update on the 3D is just REALLLLLLLLY slow), on my X850 it runs normal.


teamonkey(Posted 2005) [#7]
You've got to be careful with swap intervals. There are all sorts of reasons why you'd be getting different results on different machines.

bglSetSwapInterval isn't supported by all cards and operating systems. It should return True if supported, False otherwise.

If you use Graphics...Flip then there are timing issues to consider. If Graphics can set the screen hertz to the specified value, it will call bglSetSwapInterval(1) and rely on the vsync to keep the game running at that refresh rate. In that case you can override bglSetSwapInterval with your own value. If Graphics can't set the screen hertz to the desired value it will call bglSetSwapInterval(0) (i.e. don't wait for a vsync) then Flip will pause for a few millisecs before calling bglSwapBuffers() in order to keep the game running at the desired refresh rate. If you override bglSetSwapBuffers in this case your game may have the timing and the vsync to wait for.

If you want to completely ignore the timing mechanism of Graphics...Flip, use bglSwapBuffers() instead of Flip.

Oh, and check out http://blitzwiki.org/index.php/BglSetSwapInterval