[D3D10] How to take a screenshot with multisampling

Started by
0 comments, last by Pacome 16 years, 2 months ago
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
Advertisement
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

This topic is closed to new replies.

Advertisement