what does FPS mean in DirectX??

Started by
3 comments, last by JoeZ 21 years, 8 months ago
Hi: I am just a bit confused by the FPS in directx. Does it mean Frames being flipped to the screen per second or frames rendered per second? I guess it should be the second one because the monitor can only support a max refresh rate of 200Hz, which means you can only flip max 200 frames to the screen per sec otherwise you will get the tear effect, but in some directx program I saw a fps of 800. It can''t be the frame drawn to the screen per sec. : ( Any advises?
Advertisement
frames rendered a second

Eric Wright o0Programmer0o




Eric Wright o0Programmer0o
its frames per second. depending on the code it may only calculate the render time. the physics/logic and render time. may or may not include the flip (ie might show theoretical frame rate based disregarding actual flip/blit to front buffer, why? dont know since its pretty useless since you could just as easily flip without waiting for refresh). look at the code and see what it does. from my expierence all the d3d samples frame rate caculations include the entire single run of the main loop (ie messages handled, game logic, render, flip, as well as other processes using the cpu. in other words the actual framerate being acheived under the current cpu load and refesh wait settings). its the easiest one to calculcate since you just need to check the time once per frame.

you dont have to lock to the refresh rate (which can vary from 60hz to 200hz and higher depedning on the resolution and the quality of the video card and moniter). thus the frames per second is just what it says. the number of frames being shown per second. you can flip during refresh though you get tearing. d3d dont care, and you have to specify whether you wish to sync to the refresh or not. some video card drivers even allow you to force not waiting for the refresh for the extra framerate you can get.

[edited by - a person on August 15, 2002 3:18:51 AM]
In fullscreen, you flip the surfaces. That way you are limited to the refresh rate of the monitor.
In windowed mode, you copy the backbuffer to the frontbuffer. This can be done many times in one monitor refresh (but you''ll only actually see one of those frames because the monitor can;t keep up).

So if you get 200fps in your app, try changing to windowed mode and see if it improves. It may decrease because it takes a lot more time to copy the whole buffer than it does to flip two pointers.

HTH, Steve

Steve
DirectX Programmer
Soon to be the new Bill Gates
Member of the Unban Mindwipe Society (UMWS)
If you''re getting 200fps (or whatever your monitor''s refresh rate is) then just turn off vsync in your display properties.

____________________________________________________________
www.elf-stone.com

____________________________________________________________www.elf-stone.com | Automated GL Extension Loading: GLee 5.00 for Win32 and Linux

This topic is closed to new replies.

Advertisement