Jump to content
  • Advertisement
Sign in to follow this  
thehan

[SOLVED] soo sloow

This topic is 4853 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Is there a way to sort of tell windows that my DX app will have a higher priority than other apps? I'm experiencing framerates of 40 fps when doing nothing else than clearing the device!!! And the framerate also depends a lot on other programs running in the background. Is this normal? I'm using this main in managed directx:
static void Main() 
{
	using(Form1 frm = new Form1())
	{
		frm.Show();
		frm.InitGraphics();
		while(frm._running)
		{
			frm.Render();
			Application.DoEvents();
		}
	}
}



Is there a better way to do it? Thanks in advance [Edited by - thehan on August 5, 2005 1:45:45 AM]

Share this post


Link to post
Share on other sites
Advertisement
That's the same for me. Well, there's nothing to do but to use
d3dpp.PresentationInterval = D3DPRESENT_INTERVAL_ONE;

It's set to D3DPRESENT_INTERVAL_DEFAULT by default in DirectX 9 SDK.

Share this post


Link to post
Share on other sites
Quote:
Original post by Zack08
That's the same for me. Well, there's nothing to do but to use
d3dpp.PresentationInterval = D3DPRESENT_INTERVAL_ONE;

It's set to D3DPRESENT_INTERVAL_DEFAULT by default in DirectX 9 SDK.


Wait, isn't immediate faster?

Share this post


Link to post
Share on other sites
Quote:

Wait, isn't immediate faster?


Yes use:

d3dpp.PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE

if you want full framerate and not locked to vsync.

Share this post


Link to post
Share on other sites
Yeah, sorry. For my part I just need it to be locked to vsync, since I'm locking the framerate :\

Share this post


Link to post
Share on other sites
What kind of hardware are you running? If the FPS is varying with your background task usage, you probably have a slower CPU or not enough RAM. Can you also show us the code you use to initialise the device and render? I am assuing this is a windowed app? Have you tried going full screen?

Share this post


Link to post
Share on other sites
Thanks for your replies.

Sr_Guapo:
I'm running a P4 2,8GHz CPU and a GeforceFX card. It shouldn't be any problems. Currently I'm running windowed mode, is that slower? I will try to use fullscreen... well it does make a difference in the meaning it doesn't vary in speed.

Well I tried to set immediate, and wow!!!, my program runs about 10000 times faster now! Thanks!!!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!