Fixed bug with scissor rectangles Y values being clamped incorrectly.

TRAC #22167 Signed-off-by: Daniel Koch git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1472 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 5dc3b8b4
...@@ -357,9 +357,9 @@ void Renderer11::setScissorRectangle(const gl::Rectangle& scissor, unsigned int ...@@ -357,9 +357,9 @@ void Renderer11::setScissorRectangle(const gl::Rectangle& scissor, unsigned int
{ {
D3D11_RECT rect; D3D11_RECT rect;
rect.left = gl::clamp(scissor.x, 0, static_cast<int>(renderTargetWidth)); rect.left = gl::clamp(scissor.x, 0, static_cast<int>(renderTargetWidth));
rect.top = gl::clamp(scissor.y, 0, static_cast<int>(renderTargetWidth)); rect.top = gl::clamp(scissor.y, 0, static_cast<int>(renderTargetHeight));
rect.right = gl::clamp(scissor.x + scissor.width, 0, static_cast<int>(renderTargetWidth)); rect.right = gl::clamp(scissor.x + scissor.width, 0, static_cast<int>(renderTargetWidth));
rect.bottom = gl::clamp(scissor.y + scissor.height, 0, static_cast<int>(renderTargetWidth)); rect.bottom = gl::clamp(scissor.y + scissor.height, 0, static_cast<int>(renderTargetHeight));
mDeviceContext->RSSetScissorRects(1, &rect); mDeviceContext->RSSetScissorRects(1, &rect);
......
...@@ -895,9 +895,9 @@ void Renderer9::setScissorRectangle(const gl::Rectangle& scissor, unsigned int r ...@@ -895,9 +895,9 @@ void Renderer9::setScissorRectangle(const gl::Rectangle& scissor, unsigned int r
{ {
RECT rect; RECT rect;
rect.left = gl::clamp(scissor.x, 0, static_cast<int>(renderTargetWidth)); rect.left = gl::clamp(scissor.x, 0, static_cast<int>(renderTargetWidth));
rect.top = gl::clamp(scissor.y, 0, static_cast<int>(renderTargetWidth)); rect.top = gl::clamp(scissor.y, 0, static_cast<int>(renderTargetHeight));
rect.right = gl::clamp(scissor.x + scissor.width, 0, static_cast<int>(renderTargetWidth)); rect.right = gl::clamp(scissor.x + scissor.width, 0, static_cast<int>(renderTargetWidth));
rect.bottom = gl::clamp(scissor.y + scissor.height, 0, static_cast<int>(renderTargetWidth)); rect.bottom = gl::clamp(scissor.y + scissor.height, 0, static_cast<int>(renderTargetHeight));
mDevice->SetScissorRect(&rect); mDevice->SetScissorRect(&rect);
mCurScissor = scissor; mCurScissor = scissor;
......
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