Fix the y offset of Renderer11::copytexture to correct the inverted output image.

Was breaking the WebGL conformance test copy-tex-image-and-sub-image. TRAC #22589 Signed-off-by: Geoff Lang Signed-off-by: Nicolas Capens Author: Jamie Madill git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1911 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 09bf2a79
...@@ -2518,9 +2518,9 @@ bool Renderer11::copyTexture(ID3D11ShaderResourceView *source, const gl::Rectang ...@@ -2518,9 +2518,9 @@ bool Renderer11::copyTexture(ID3D11ShaderResourceView *source, const gl::Rectang
// Create a quad in homogeneous coordinates // Create a quad in homogeneous coordinates
float x1 = (destArea.x / float(destWidth)) * 2.0f - 1.0f; float x1 = (destArea.x / float(destWidth)) * 2.0f - 1.0f;
float y1 = (destArea.y / float(destHeight)) * 2.0f - 1.0f; float y1 = ((destHeight - destArea.y - destArea.height) / float(destHeight)) * 2.0f - 1.0f;
float x2 = ((destArea.x + destArea.width) / float(destWidth)) * 2.0f - 1.0f; float x2 = ((destArea.x + destArea.width) / float(destWidth)) * 2.0f - 1.0f;
float y2 = ((destArea.y + destArea.height) / float(destHeight)) * 2.0f - 1.0f; float y2 = ((destHeight - destArea.y) / float(destHeight)) * 2.0f - 1.0f;
float u1 = sourceArea.x / float(sourceWidth); float u1 = sourceArea.x / float(sourceWidth);
float v1 = sourceArea.y / float(sourceHeight); float v1 = sourceArea.y / float(sourceHeight);
......
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