Skip to main content
GameDev.net gamedev.net
🔒 Locked

FPS problem

Started by GamerSg May 21, 2003 at 7:43 AM 9 replies 1.2k views
Original Post
GamerSg
GamerSg
I have tried several FPS counters and they all display 60FPS whether there is one polgon on screen or 200. Its not my graphics card which is limiting the fps, but the monitor. When i change my refresh rate to 85hz, the fps changes to 85. What i want however is the fps being drawn by my system and not limited by the refresh rate of the monitor. BTW, the maximum refresh rate is 85hz for my monitor, there is no optimal. So how do i get those 100-3000 fps u guys tend to get when running an empty window?
James Trotter
James Trotter
It is definitely being limited by the monitor refresh rate.

Turn off vsync.
Psirus
Psirus
There is an option to turn vsync off/on in your opengl nvidia settings found in your disply settings
=============================================Want to be paid for using your programming/graphics skills from home?Then become a Freelancer today! www.FreelanceUK.net=============================================
James Trotter
James Trotter
As far as I know, I don''t think it is possible to turn off vsync, in OpenGL, in code... Your manufacturer usually lets you turn it on/off manually somehow...

What I do:

1. Right click on the desktop
2. Choose properties
3. Go to the settings tab
4. Click on advanced
5. Go to the 3D settings
6. Click on the checkbox for disable VSync...

I think most cards can do something similar...
Krohm
Krohm
It''s simply not possible in standard GL.

There''s a WGL extension for that. It''s called WGL_EXT_swap_control.

Now, don''t fear the thing it''s WGL. Checking for WGL extensions is a bit more complicated but getting ext pointers is as easy as it is with other ext.

More on this if you are interested.
Previously "Krohm"
GamerSg
GamerSg
Thx, i found it under settings. Besides, i just want to see 100+fps during development. So now, whenever i add something new to my engine or draw something new, ill noe how much it affects the framerate.

Also, no matter how fast ur system, it will always be displaying at the rate at which ur monitor supports.So Vsync is actually good.
Krohm
Krohm
"Also, no matter how fast ur system, it will always be displaying at the rate at which ur monitor supports.So Vsync is actually good."
I don''t get the point in this however, in my opinion vsync is a horrible thing while developing.

Some days ago I did a thing which resulted in a 84fps slowdown on a 85hz display. With vsync off i notices it was, in fact a 200fps slowdown. Quite different.

Now, the thing was very stupid but I am going to leave vsync off during devel. Limitating vid card power is bad because it hides your pipe optimizations if you are doing some and does not show you what''s the best between two render paths for example.

If you want to turn it on/off every time it''s up to you but I personally think the vsync thing must be handled with care and definetly turned off while developing / benchmarking.
Previously "Krohm"
Krohm
Krohm
Oh, well not sure, on this however, it''s a personal opinion.
Excuse me if I have misunderstood you post. Sorry!
Previously "Krohm"
Darkor
Darkor
It''s not a very good way to make your game run at an equal pace. For one thing, other computer may be slower and run at 80 fps so this doesn''t guarantee that all games run at an equal pace.

To do that, there are several methods and varying levels of complexities should you wish to implement them.

Half-life scales back on textures when running on a lousy graphics card. This auto scaling feature works great to acheive higher frame rates on less powerful systems. Plus you can implement this for other systems, like play less ambient music or something like that.

To lock down framerates, you can use the sleep function, though that is a waste of time if you use it just like that. Some people suggest that you calculate the amount of time to sleep from the amount of time spent and then sleep for that duration.

In order not to be wasting CPU cycles, you can implement your input and networking modules in seperate threads, which don''t require that they follow the framerate.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.