• Advertisement
Sign in to follow this  

OMSetRenderTargets double/triplebuffering

Recommended Posts

I'm looking at some code that is supposed to support triple buffering.  DXGI_SWAP_CHAIN_DESC1.BufferCount = 3;

However it looks like it calls swapChain->GetBuffer(0,.....);   And then it continually does OMSetRenderTarget(Buffer0) to the same exact buffer/view over and over not taking into account that there are 3 buffers. I also modified a directx example that was cycling 2 buffers for double buffering and modified its code to continually set the same render target instead of cycling them. I would think there would be flicker as one buffer would never be used. I'm assuming the driver knows if you set the same buffer that it will automatically correct itself?  The game definitely is running 60fps, so I can only assume that this is an intended DirectX thing?

I'm assuming this only ever needs to be setup correctly if you are using DXGI_PRESENT_DO_NOT_WAIT ?


Edited by dpadam450

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  

  • Advertisement