FPS and monitor refresh

Started by
6 comments, last by adriano_usp 20 years, 4 months ago
Hi, Just one doubt: I render nothing in my scene (just a test) and the v-sync is on. My monitor works at 85Hz, but I''m get ~46 fps. If no meshes are render in the scene, why the fps is smaller than monitor refresh? Thanks.
Advertisement
are you sure ur using D3DPRESENT_INTERVAL_ONE ?
Hi A.W.
...yes, I''m using D3DPRESENT_INTERVAL_ONE.

But I think that I know where is the problem... I was testing in window mode... on the fullscreen mode the fps is equal to the screen refresh.

Another doubt:

I have many meshes in my scene. When I place the focus of the camera in a region where there are no meshes (no meshes between the clipping planes) the fps increases very very slowly. Why?

Thanks.
quote:
I have many meshes in my scene. When I place the focus of the camera in a region where there are no meshes (no meshes between the clipping planes) the fps increases very very slowly. Why?


The FPS increases slowly because you are most likely calculating the average FPS over the life on the scene. If you want to get the actual FPS at a moment in time; you would have to calculate it based on a smaller time interval (say one iteration). To answer you other question; just because you don''t have any meshes in the viewing frustum, doesn''t mean that the performance of your game is going to necessary increase by leaps and bounds.

In order to dramatically increase the frame rate when there is nothing in the viewing frustum, you have to remove the polygons from the scene manually; otherwise they will still be past through the graphics pipeline. Moreover, even if none of the polygons are rendered to the screen; you could be creating a bottleneck in the pipeline by passing a large number of polygons.



_______________________________________
Understanding is a three edged sword...
_______________________________________Understanding is a three edged sword...Freelance Games - Home of XBLIG Starchonwww.FreelanceGames.com
Thank you Sean,

...but I still have a small doubt: If I remove the polygons from the scene manually and need to render them again, should I load them in game time?
... anybody?
Sean is referring to a technique called frustum culling. There is a decent tutorial on Flipcode.
http://www.flipcode.com/articles/article_frustumculling.shtml
quote:
If I remove the polygons from the scene manually and need to render them again, should I load them in game time?


You need to remove polygons from the graphics pipeline that are not in the frustum at the time of rendering. When I say you need to remove the polygons; I mean that you should only render the polygons that are in the frustum; I do not mean that you should release them from memory and load them from disk at a later time. You shouldn''t release a mesh from memory and reload it, unless you know you will no longer need the mesh till much later in the scene.

_______________________________________
Understanding is a three edged sword...
_______________________________________Understanding is a three edged sword...Freelance Games - Home of XBLIG Starchonwww.FreelanceGames.com

This topic is closed to new replies.

Advertisement