locked
How to migrate ID3D10Texture2D::Map and D3D10_MAPPED_TEXTURE2D

    Question

  • 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, &copyBuffer);
    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?
    Sunday, July 15, 2012 2:17 PM

Answers

All replies