Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I have no idea how to measure the fps of an application. Even the measuring mechanism will depend on what graphic library the application uses (OpenGL vs DirectX vs software rendering). The only application I know that does this kind of thing is fraps (http://www.fraps.com/) so it is possible.

 

Refresh rate is not the same as fps. Refresh rate is used for the speed the monitor can update the display. For CRT monitors this is linked to the vertical frequency, and complicated by interlaced/not interlaced matters (although I think the only CRTs still around that use interlacing is a TV ;) ). LCD/TFT is a completely different matter, manufacturers also mention a refresh rate for them, but I think that is more based on the time it takes to change the color of a pixel as it doesnt have an electron beam to move around at high speed.

The FPS of an application however, is how many frames the application can calculate. This can be lower than the refresh rate (if FPS is very low, you get a slideshow effect ;) ) or it can be faster than the refresh rate (possibly resulting in tearing of an image if the image the monitor is displaying, is updated halfway). To make it more fun, many applications that do 3d rendering have a 'lock vsync' function that limits the FPS to the refresh rate.

So the values might be equal, but refresh rate is hardware limited and can't be changed without changing hardware. The value can easily be looked up in the hardware specification of the monitor. FPS is a software issue that is dependent on the pc rendering, faster software results in more FPS. This can probably be only measured at the graphic driver level, but I have no idea how.

Nothing is as illusive as 'the last bug'.
Posted
Most newer games come with the ability to display thier own fps so depending on what your trying it might be easier to find that way.
Anybody looking for a graduate programmer (Midlands, England)?
Posted

One relatively easy way is to make another thread that just does this:

 

static oldspot as integer

do while programrunning

threadname.sleep(1000)

fps = counter - oldspot 'counter is a variable that's the counter in your main game loop.

oldspot = counter

loop

 

This is probably a really really really really really bad way of doing it, but it's still one really easy way.

 

Another way deals with environment.gettickcount to figure out when a second has passed, and then you basically just do the same thing to find out how many frames went by.

  • Leaders
Posted
One relatively easy way is to make another thread that just does this:

 

static oldspot as integer

do while programrunning

threadname.sleep(1000)

fps = counter - oldspot 'counter is a variable that's the counter in your main game loop.

oldspot = counter

loop

 

This is probably a really really really really really bad way of doing it, but it's still one really easy way.

 

Another way deals with environment.gettickcount to figure out when a second has passed, and then you basically just do the same thing to find out how many frames went by.

The question was to measure the refresh rate of a different program.

[sIGPIC]e[/sIGPIC]

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...