OMSetRenderTargets double/triplebuffering

Started by
0 comments, last by SoldierOfLight 6 years, 11 months ago

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 ?

Thanks.

NBA2K, Madden, Maneater, Killing Floor, Sims http://www.pawlowskipinball.com/pinballeternal

Advertisement

Unless you're running on D3D12, DXGI will take care of rotating the back buffers so that all you need to render to is buffer 0.

This topic is closed to new replies.

Advertisement