J
judy10
Guest
I use DirectX11 and want to get ImageData by Map function.
I created the Texture like below.
////////////////////////////////////////////////////////////////////////////////
D3D11_TEXTURE2D_DESC Desc;
ZeroMemory(&Desc, sizeof(D3D11_TEXTURE2D_DESC));
Desc.ArraySize = 1;
Desc.BindFlags = D3D11_BIND_RENDER_TARGET | D3D11_BIND_SHADER_RESOURCE;
Desc.Usage = D3D11_USAGE_DEFAULT;
Desc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
Desc.Width = m_nSize.x;
Desc.Height = m_nSize.y;
Desc.MipLevels = 1;
Desc.SampleDesc.Count = 1;
Desc.SampleDesc.Quality = 0;
////////////////////////////////////////////////////////////////////////////////
But Map fuction of the context return fail.
Is there any way to get ImageData of Target Texture?
Continue reading...
I created the Texture like below.
////////////////////////////////////////////////////////////////////////////////
D3D11_TEXTURE2D_DESC Desc;
ZeroMemory(&Desc, sizeof(D3D11_TEXTURE2D_DESC));
Desc.ArraySize = 1;
Desc.BindFlags = D3D11_BIND_RENDER_TARGET | D3D11_BIND_SHADER_RESOURCE;
Desc.Usage = D3D11_USAGE_DEFAULT;
Desc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
Desc.Width = m_nSize.x;
Desc.Height = m_nSize.y;
Desc.MipLevels = 1;
Desc.SampleDesc.Count = 1;
Desc.SampleDesc.Quality = 0;
////////////////////////////////////////////////////////////////////////////////
But Map fuction of the context return fail.
Is there any way to get ImageData of Target Texture?
Continue reading...