Accurate Framerate ...
BlitzMax Forums/BlitzMax Programming/Accurate Framerate ...
| ||
If frameTimer + 1000 < MilliSecs() frameTimer = MilliSecs() frameRate = frameCounter frameCounter = 0 Else frameCounter:+ 1 EndIf So I'm computing my frameRate with that ... seems to work fine. Except I can't get over 60fps ... if I remember correctly I'd want to use a Flip False in B3D to unleash the program from the refresh rate ... I can't seem to find a way to do this in BlitzMax. Is it possible? |
| ||
bglSetSwapInterval( 0 ) That should make it flip as fast as you can go through your code. If you eg. use 60, then it will try and do it 60 times per second. |
| ||
Thanks! |
| ||
Using -1 for Graphic's hertz param will do the same. |
| ||
Hmmm... yeah was going to say that doesn't work ... unless I don't use flip and instead use bglswapbuffers() in which case it goes super fast and I can't seem to limit it anyway. |
| ||
LOL, I see ... I wasn't even paying attention to the way the new Graphics() function works! Thanks! |
| ||
Yes, bglSetSwapInterval( 0 ) only works together with bglswapbuffers(), forgot to mention that. I haven't really been using the max2d stuff but only openGL with bmax so far. :) |