Fixed rounding error in SwapChain11::swapRect vertex coordinates.

#22472 Signed-off-by: Jamie Madill Signed-off-by: Shannon Woods Author: Geoff Lang git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1794 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 2001a0cc
......@@ -473,10 +473,10 @@ EGLint SwapChain11::swapRect(EGLint x, EGLint y, EGLint width, EGLint height)
d3d11::PositionTexCoordVertex *vertices = static_cast<d3d11::PositionTexCoordVertex*>(mappedResource.pData);
// Create a quad in homogeneous coordinates
float x1 = (x / mWidth) * 2.0f - 1.0f;
float y1 = ((mHeight - y - height) / mHeight) * 2.0f - 1.0f;
float x2 = ((x + width) / mWidth) * 2.0f - 1.0f;
float y2 = ((mHeight - y) / mHeight) * 2.0f - 1.0f;
float x1 = (x / float(mWidth)) * 2.0f - 1.0f;
float y1 = ((mHeight - y - height) / float(mHeight)) * 2.0f - 1.0f;
float x2 = ((x + width) / float(mWidth)) * 2.0f - 1.0f;
float y2 = ((mHeight - y) / float(mHeight)) * 2.0f - 1.0f;
float u1 = x / float(mWidth);
float v1 = y / float(mHeight);
......
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