Sign in to follow this  

slow d3d

This topic is 4733 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

does d3d restrict the speed of programs automatically? the author from the book i'm studying made this example: example.exe it seems like it should be running much faster than it does, considering nothing in the main program loop directly slows it down. [Edited by - eal on December 30, 2004 4:06:07 PM]

Share this post


Link to post
Share on other sites
I didn't download the example, sorry but dont just download executables (most people here probably dont aswell) that i dont know what exactly it is.

Can you better describe your problem, what the example is doing, what hardware are you running and how fast or slow it is running.

My guess would be that you have VSYNC on, if your fps is limited to 60,75,85 (whatever your monitor refresh rate is). I'm not too familiar with D3D but check the device create or present (swapbuffers) or the D3D SDK docs for it.

Share this post


Link to post
Share on other sites
so it works like this?

instead of going through the main loop as fast as possible, the program is slowed down to only loop 60 times a second or whatever

Share this post


Link to post
Share on other sites
ok apparently it does, after i tested the fps. is there any way to change this?

this is what i'm doing:



D3DDISPLAYMODE mode ;

mode.Height=RES_Y;
mode.Width=RES_X;
mode.RefreshRate=0;
mode.Format=D3DFMT_A8R8G8B8;

D3DPRESENT_PARAMETERS parameter;

parameter.AutoDepthStencilFormat = D3DFMT_UNKNOWN ;
parameter.BackBufferCount=1;
parameter.BackBufferFormat=mode.Format;
parameter.BackBufferHeight=RES_Y;
parameter.BackBufferWidth=RES_X;
parameter.EnableAutoDepthStencil = FALSE ;
parameter.Flags=0;
parameter.FullScreen_PresentationInterval=D3DPRESENT_INTERVAL_IMMEDIATE
parameter.FullScreen_RefreshRateInHz=0;
parameter.hDeviceWindow=windowhandle;
parameter.MultiSampleType=D3DMULTISAMPLE_NONE;
parameter.SwapEffect=D3DSWAPEFFECT_FLIP;
parameter.Windowed=FALSE;

Share this post


Link to post
Share on other sites
Quote:
Original post by eal
ok apparently it does, after i tested the fps. is there any way to change this?

this is what i'm doing:



D3DDISPLAYMODE mode ;

mode.Height=RES_Y;
mode.Width=RES_X;
mode.RefreshRate=0;
mode.Format=D3DFMT_A8R8G8B8;

D3D8OBJ->EnumAdapterModes ( D3DFMT_A8R8G8B8 , 0 , &mode ) ;

D3DPRESENT_PARAMETERS parameter;

parameter.AutoDepthStencilFormat = D3DFMT_UNKNOWN ;
parameter.BackBufferCount=1;
parameter.BackBufferFormat=mode.Format;
parameter.BackBufferHeight=RES_Y;
parameter.BackBufferWidth=RES_X;
parameter.EnableAutoDepthStencil = FALSE ;
parameter.Flags=0;
parameter.FullScreen_PresentationInterval=D3DPRESENT_INTERVAL_IMMEDIATE
parameter.FullScreen_RefreshRateInHz=0;
parameter.hDeviceWindow=windowhandle;
parameter.MultiSampleType=D3DMULTISAMPLE_NONE;
parameter.SwapEffect=D3DSWAPEFFECT_FLIP;
parameter.Windowed=FALSE;


Either turn your refresh rate up, or disable vsync...I am not sure, but I am fairly certain there is a way to do this through Direct3d...

Share this post


Link to post
Share on other sites

This topic is 4733 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.

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