SwapChain11::swapRects now correctly sets the viewport to the size of the window.

TRAC #22374 Signed-off-by: Nicolas Capens Signed-off-by: Daniel Koch Author: Geoff Lang git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1680 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 7fbf486e
......@@ -431,6 +431,16 @@ EGLint SwapChain11::swapRect(EGLint x, EGLint y, EGLint width, EGLint height)
// Apply render targets
deviceContext->OMSetRenderTargets(1, &mBackBufferRTView, NULL);
// Set the viewport
D3D11_VIEWPORT viewport;
viewport.TopLeftX = 0;
viewport.TopLeftY = 0;
viewport.Width = mWidth;
viewport.Height = mHeight;
viewport.MinDepth = 0.0f;
viewport.MaxDepth = 1.0f;
deviceContext->RSSetViewports(1, &viewport);
// Apply textures
deviceContext->PSSetShaderResources(0, 1, &mOffscreenSRView);
deviceContext->PSSetSamplers(0, 1, &mPassThroughSampler);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment