Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17560

Glitches with flip model swap chain

$
0
0

I have a program where I used a bitblt model swap chain (DXGI_SWAP_EFFECT_DISCARD, the default used by most samples), and it worked fine.

 

But now I want to use a flip model swap chain (DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL), and I'm getting some glitches. Basically, it keeps rendering a pair (2) of old frames over and over, and the two frames only get updated at random times. (Unfortunately, posting a screenshot wouldn't help because it only shows a normal frame.)

 

I've tried just about every relevant combination of the two parameters for IDXGISwapChain::Present, particularly with the flags DXGI_PRESENT_RESTART and DXGI_PRESENT_DO_NOT_SEQUENCE, but nothing changes.

 

If it matters, the program also uses Direct2D. I did see this MSDN page ( https://msdn.microsoft.com/en-us/library/windows/desktop/hh706346(v=vs.85).aspx ), which says "Use flip model in an HWND that is not also targeted by other APIs, including DXGI bitblt presentation model, other versions of Direct3D, or GDI." But it doesn't mention Direct2D, so I'm not sure if this could be the problem.

 

A couple of other points:

 

- I create the swap chain with two buffers, as the debug layer told me to.

- Direct3D 11.1, Windows 8.1, Visual Studio 2013


Viewing all articles
Browse latest Browse all 17560

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>