Err,
I found more information on the GETTIMER() issue.
if SLEEP = 0 then my test program runs 4000 fps
if SLEEP = 1 then my test program runs 60fps
Adding 1 millisecond per frame shouldnt cause the frame rate to drop to 60 fps.
The frame rate should be 1000 fps.
Anyone have an idea of whats going on?
Did you set LIMITFPS?
Normaly you aren't supposed to get more than 500 FPS because that is the cap in GLBasic.
If I do a simple loop only displaying the FPS and put a SLEEP 1 in it, I get 512 FPS, if I remove the SLEEP I get 500.
ok...
The test program normally runs 4000 fps with LIMITFPS 60000
Now, I set it to 500:
LIMITFPS 500.
SLEEP 0 = 500 FPS
SLEEP 1 = 60 fps
It shouldnt drop to 60 fps if SLEEP is set to 1.
It should be hitting the max frame rate of 500.
Gernot, any input here?
Dont forget that SLEEP returns control to the operating system.
Hmm, so windows is hogging my fps with sleep 1 ?
What did you set your grafics card to? Limit FPS or free FPS or Application desides?
nvidia gt6800
set FORCE VSYNC = OFF
Remeber when i had an issue with getpixel?
This was the solution.
Solution for getpixel should be AA = off.
indeed, but i want higher fps regardless.
the ability to of testing programs with extreme frame rates is desirable.
i found a workaround, i dont need sleep anymore,
QuoteHmm, so windows is hogging my fps with sleep 1 ?
It could be doing anything with it...
I have no idea. I really just call the SLEEP command from the operating system.
Quotei found a workaround, i dont need sleep anymore,
You shouldn't anyway... Did you use GETTIMER directly after the sleep command as well ?
No, i only use GETTIMER() in my programs one time.....right before the SHOWSCREEN, as it reports the time since the last showscreen.
I expect the time difference would be large between the SLEEP command causing the FPS to be less than what you would normally get. I think the FPS value with SLEEP would be correct though, especially as it would slow everything down... =D
Thanks for the replies and helping me understand the SLeep function.
GLBasic Team Rocks On! :good: