Sunday, July 15, 2012 2:17 PM
I am porting a Direct3D10 routine that read backbuffer pixels.
ID3D10Texture2D *backBuffer, *copyBuffer; D3D10_TEXTURE2D_DESC tex2dDesc; D3D10_MAPPED_TEXTURE2D mapTex; m_swapChain->GetBuffer(0, __uuidof(ID3D10Texture2D), reinterpret_cast<void**>(&backBuffer)); m_d3dDevice->CreateTexture2D(&tex2dDesc, NULL, ©Buffer); copyBuffer->Map(0, D3D10_MAP_READ, 0, &mapTex); copyBuffer->Unmap(0);The problem is that ID3D10Texture2D::Map and D3D10_MAPPED_TEXTURE2D are no longer provided in Direct3D11. What are the equivalent functions in Direct3D11, or how to read backbuffer pixels in Direct3D11?
- Changed Type Rob CaplanMicrosoft Employee, Moderator Tuesday, July 17, 2012 12:06 AM
Monday, July 16, 2012 3:44 PM
Now you should use ID3D11DeviceContext::Map
Monday, July 16, 2012 5:53 PMModerator
As RaptorCK16 says, use ID3D11DeviceContext::Map.
Differences such as this between D3D10 and D3d11 are documented at Migrating to Direct3D 11.
- Proposed As Answer by Rob CaplanMicrosoft Employee, Moderator Tuesday, July 17, 2012 12:06 AM