Archived

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

Uncaged

D3D - Made my app go much faster

Recommended Posts

I was tweaking my initialization code earlier today, and I came across this paremeter. I was not setting it before, but when I put this code in, my app went from a steady 60fps to 200fps. d3dpp.FullScreen_PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE; If anyone has used this before, maybe you can enlighten me why I would need to set this parameter to get anything going fast. Why wouldn''t it be a default. Thanks, Brian

Share this post


Link to post
Share on other sites
This has been cut out of the DirectX-SDK Documentation. Sorry folks . .

FullScreen_PresentationInterval
Maximum rate at which the swap chain''s back buffers may be presented. For a windowed swap chain, this value must be D3DPRESENT_INTERVAL_DEFAULT (0). For a full-screen swap chain it may be D3DPRESENT_INTERVAL_DEFAULT or the value corresponding to exactly one of the flags enumerated in the PresentationIntervals member of D3DCAPS8.
D3DPRESENT_INTERVAL_IMMEDIATE
Present operations might be affected immediately. The driver will not wait for the vertical retrace period.
D3DPRESENT_INTERVAL_ONE
The driver will wait for the vertical retrace period. Present operations will not be affected more frequently than the screen refresh.
D3DPRESENT_INTERVAL_TWO
The driver will wait for the vertical retrace period. Present operations will not be affected more frequently than every second screen refresh.
D3DPRESENT_INTERVAL_THREE
The driver will wait for the vertical retrace period. Present operations will not be affected more frequently than every third screen refresh.
D3DPRESENT_INTERVAL_FOUR
The driver will wait for the vertical retrace period. Present operations will not be affected more frequently than every fourth screen refresh.


You may recieve some flickering, when using D3DPRESENT_INTERVAL_IMMEDIATE at a framerate which cant by clearly divided by your refreshrate!

Share this post


Link to post
Share on other sites
The parameter tells D3D to flip the frame straight away instead of waiting for the VSync of the monitor which is 60 frames per second.

Its probaly a good idea to go back to 60FPS as I have found that sometimes disabling the VSync causes the Video card to take most of the PC''s processing power, causing stalling in other areas of the game and Windows itself.

Demo Download: www.angelfire.com/realm/zeroone

Share this post


Link to post
Share on other sites