Limited framerate

Started by
4 comments, last by SiS-Shadowman 18 years ago
hi, i have some problems with ALL my applications. the framerate is somehow limited to about 60 frames, and it seems that it doesn't matter how many triangles are shown, because this also happens when i only draw some quads.... i have a Athlon XP 2700+ with 1,5 gigs of ram and a GeForce 6600 GT with 128 MB of ram, i think this should be enough for my apps ( they aren't that complex ) my terrain viewer, for example, draws about 60k triangles per frame. what can be causing this? my main game loop has no "break" in it, so logicaly there is some function call wich slows down my app, isn't it? what functions could this be? i'm using swprintf_s pretty frequent ( perhaps 10-20 times per frame ) 64 times DrawIndexedPrimitive ( for each terrain patch 1 time ) 1 times D3DXMatrixLookAtLH 6 times sinf / 9 times cosf // i still haven't implemented the lookup table for sin / cos, but when i commented out these calls, the framerate didn't increase i'm using 2 different shader files, one for the terrain and one for the console ( wich isn't displayed yet... ) i thought it might be the microsoft D3DFont, that slows down my app ( wich i use to draw the framerate on the screen ), so i deactivated it and started fraps to show me the framerate, but it says the app. is running with 60 frames i don't know where to start, perhaps you can give me some hints, how to figure out this problem
Advertisement
You're probably set your device to only update with VSYNC which usually happens 60 time a second, hence the same framerate no matter what you're drawing.

Check the .SwapEffect member of your D3DPRESENT_PARAMETERS when you create the device. Most likely it's set to D3DSWAPEFFECT_COPY_VSYNC.
i'm running the app in windowed mode ( but should this limit the framerate? )
and using
d3dpp.SwapEffect = D3DSWAPEFFECT_FLIP;
for the setting :-/

PS: as i see, it doesn't change anything when i run the app in fullscreen mode *g
Check the PresentationInterval member of the same structure. This needs to be set to IMMEDIATE, and is probably currently set to ONE (or not set at all).

Also, there is a possibility that the drivers override this setting, in which case you'd have to disable VSync in your graphics drivers (or set it to Application Controlled).
Sirob Yes.» - status: Work-O-Rama.
For future reference, this is covered in the Forum FAQ.
hm, ok, it works now, but my function doesn't output the right framerate o_O
fraps did it right...

i need to look for the code and see whats wrong

****edit****

ok, i don't know whats wrong here, my app sais that the frametime is about 0.016sec, wich will give an average of 66 fps, but fraps still sais that the app is running at ~400 fps, i don't get it ^^

This topic is closed to new replies.

Advertisement