Sign in to follow this  
Pseelo

SlimDX and frame per second rate. FPS seems to be low.

Recommended Posts

Pseelo    122
Hi. I'm using SlimDX for few days and generally I really admire the work you guys (I hope the authors will read the post) put into it. I'm developing a simple 2D project based on your library and the SampleFramework you included in the SDK. The project is not demanding - its scenes contain up to 20 text lines and some polygons - but I realised that the fps is really low as for that (about 60fps). At first I thought that I allowed to VSync and the fps is simply adjusted to my monitor refresh rate. I checked that and there is no trace of VSync in the code. Beside that I changed the monitor refreshing to 60Hz and back to 75Hz and the fps didn't move a bit. Unfortunately when I run the samples included in the SDK the fps is exactly the same as in my app. Even in the SampleTriangle demo. And no, my graphics card is not so slow - the samples from the newest DirectX SDK (C++, I know) are not only more complicated but dramatically faster (500fps and up for a textured mesh with light and shadows) Could anybody tell me what is wrong? Is it a SlimDX problem (which I don't want to believe) or just my lack of knowledge? There's not even any need to look at my code - I will be really happy and a lot wiser if anyone tell me what to do with the SampleTriangle to get 500fps :) By the way - is there any hope for a less laconic documentation in the future? [sorry, i should have mentioned that I use C#] Best regards. Chris. [Edited by - Pseelo on November 20, 2008 3:32:25 AM]

Share this post


Link to post
Share on other sites
Pseelo    122
Thank you kindly.
I think this solves my problem. I've got no chance to check it at once because I'm at work at the moment (and 64bit Windows I use here doesn't support SlimDX 64 for unknown reason) but I looked up the SlimDX docs and it seems that PresentInterval.Default waits for the vertical retrace period, so this might be the case.

I have additional question though. The cause why FPS rate worried me was that I wrote simple scene transition. I just use filled rectangle with alpha changing in time. Assuming I actually used VSync there should be no blinking while drawing this rectangle but for sure the drawing was not smooth. In other words - do PresentInterval.Default & backbuffer & VSync guarantee that [of course if the scene rendering time is shorter than vertical retrace period] there will be no blinking?

Best regards.
Chris.

Share this post


Link to post
Share on other sites
ViLiO    1326
PresentInterval.Default will attempt to v-sync but uses a lower resolution timer than PresentInterval.One, which uses timeBeginPeriod to improve the v-sync. This is not to say that PresentInterval.Default doesn't provide a good v-sync (as it does) so any tearing or "blinking" are probably caused by something else in your code.

Regards,
ViLiO

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this