Sign in to follow this  
Pacome

[D3D10] How to take a screenshot with multisampling

Recommended Posts

Hello, I would like to take a screenshot of a D3D10 backbuffer with multisampling. I know how to do this *without* multisampling and using a temp texture : - Get the backbuffer : m_swapChain->GetBuffer(...) - Use ID3D10Device::CopyResource to copy the backbuffer into a texture (which has been created in STAGING mode in order to be mapped) - Use ID3D10Texture2D::Map to get the RGBA buffer from the copied texture. It works very fine *without* multisampling. But the function CopyResource doesn't work with multisampled textures/buffers, as MSDN said. MSDN said that D3D 10.1 will allow using CopyResource with multisampled textures, but my card doesn't support the 10.1 version for the moment. So, is there a way to access backbuffer memory without using CopyResource ? Maybe I'm totally wrong and there is a nice way to take a screenshot with D3D10 ? Thanks a lot for your help Pacôme

Share this post


Link to post
Share on other sites
For people who have the same problem, here is the solution given on a french forum : the method ID3D10Device::ResolveSubresource is the only one which can "resolve" a multisampled resource in order to copy/use it as a classic resource.

Pacôme

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