Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Niklas2k2

Vertical synched Constant FPS

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

Hello, i have a simple Hello World D3D application upp and running but I get a vertical synched FPS. I have turned this "always off" on my graphics card but still get vertical synch. How do i turn this of from within my apllication ? These are my init parameters to D3D (taken from nexe). g_pDirect3D=Direct3DCreate9(D3D_SDK_VERSION); // Create Direct3D if (g_pDirect3D==NULL); // Check if it succeeded, if it didn''t, return failure D3DDISPLAYMODE displayMode; // Structure to hold display mode info, like the resolution g_pDirect3D->GetAdapterDisplayMode( D3DADAPTER_DEFAULT, &displayMode); // Get the current display mode on he default display adapter D3DPRESENT_PARAMETERS presentParameters; // Used to explain to Direct3D how it will present things on the screen memset(&presentParameters, 0, sizeof(D3DPRESENT_PARAMETERS)); // We need to fill it with 0''s first presentParameters.Windowed = TRUE; // Then set windowed to true presentParameters.SwapEffect = D3DSWAPEFFECT_DISCARD; // Tells Direct3D to present the graphics to the screen the quickest way possible. We don''t care if it saves the data after or not. presentParameters.BackBufferFormat = displayMode.Format; // The color format presentParameters.BackBufferWidth = displayMode.Width; // The back buffer width presentParameters.BackBufferHeight = displayMode.Height; // The back buffer height // Create the device g_pDirect3D->CreateDevice( D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hwnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &presentParameters, &g_pDevice );

Share this post


Link to post
Share on other sites
Advertisement
Set the presentation interval to "Immediate". The default presentation interval is 1 (V-sync)

Share this post


Link to post
Share on other sites
You are not setting all the values of the

D3DPRESENT_PARAMETERS

In particualr, set the PresentationInterval value to

D3DPRESENT_INTERVAL_IMMEDIATE


Read SDK documentation for D3DPRESENT_PARAMETERS''s above field. It explains all permissible values for this field.

Share this post


Link to post
Share on other sites

  • 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!