PDA

View Full Version : stable Frame rate



juglarx
10-06-2007, 12:47 PM
Hi guys!! i saw in my own small demos a non-stable Frame rate, i mean i don't move anything in the scene even the camera, just draw and i have 90 fps and 100 fps afther a second, an then 87 fps... and all in that range all the time, any one can give me a clue about where to start solve that performace issue ?
thanks in advance!

ZbuffeR
10-06-2007, 03:52 PM
Vsync ? triple buffer ? background processes ?

Measure milliseconds not FPS (so that you get absolute time differences) and try playing with higher and lower resolution, more and less scene detail, to see if the time variation comes from your app or not.

It can be issues with flushes (play with glFlush(), glFinish() is less recommended)... Are creating/deleting a lot of objects ?

It can come from your time measurement, how do you do it ?

You can try to use vsync, depending on the situation it helps a lot.
wglSwapInterval(1);


EDIT: more complex stuff, but interesting :
http://www.opengl.org/discussion_boards/ubb/ultimatebb.php?ubb=get_topic;f=3;t=011280;p=1#0000 24

juglarx
10-07-2007, 10:48 AM
thanks ZbuffeR this tips help me a lot!

Nick's a Novice
10-08-2007, 08:09 AM
I had a similar problem once before and I fixed it by checking the following:

counting Pushes and Pops

remembering to clear buffers

watch your memory in task manager and see if it is increasing at a rate which might be due to a serious memory leak.

glFlush

remembering to delete unused data stored on the graphics card (display lists, VBO's, ...)

When all else fails as suggested above absolute time is always a handy tool to check.