diff options
| author | Yong He <yonghe@outlook.com> | 2017-10-23 23:31:17 -0400 |
|---|---|---|
| committer | Yong He <yonghe@outlook.com> | 2017-10-23 23:31:17 -0400 |
| commit | 19c4119fa00972825a9f81114dac6f796e6b35f7 (patch) | |
| tree | bb82f7d8f1c284a916af0e29f7ddeeb6d838edff /tools | |
| parent | ff4f9d9d129fccc56ac01d841295120ded789696 (diff) | |
test 7
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/render-test/render-d3d11.cpp | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/tools/render-test/render-d3d11.cpp b/tools/render-test/render-d3d11.cpp index 2f7f0aad4..8643f229a 100644 --- a/tools/render-test/render-d3d11.cpp +++ b/tools/render-test/render-d3d11.cpp @@ -384,23 +384,16 @@ public: { ID3D11Texture2D* texture; D3D11_TEXTURE2D_DESC textureDesc; - //dxBackBufferTexture->GetDesc(&textureDesc); - textureDesc.ArraySize = 1; - textureDesc.MipLevels = 1; - textureDesc.SampleDesc.Count = 1; - textureDesc.SampleDesc.Quality = 0; - textureDesc.Width = gWindowWidth; - textureDesc.Height = gWindowHeight; - textureDesc.BindFlags = D3D11_BIND_RENDER_TARGET; - textureDesc.CPUAccessFlags = D3D11_CPU_ACCESS_READ; - textureDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM; - textureDesc.Usage = D3D11_USAGE_DEFAULT; - textureDesc.MiscFlags = 0; + dxBackBufferTexture->GetDesc(&textureDesc); dxDevice->CreateTexture2D(&textureDesc, nullptr, &texture); ID3D11RenderTargetView * rtv; + D3D11_RENDER_TARGET_VIEW_DESC rtvDesc; + rtvDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM; + rtvDesc.Texture2D.MipSlice = 0; + rtvDesc.ViewDimension = D3D11_RTV_DIMENSION_TEXTURE2D; dxDevice->CreateRenderTargetView( texture, - NULL, + &rtvDesc, &rtv); dxRenderTargetViews.Add(rtv); dxRenderTargetTextures.Add(texture); |
