Implement support for mipmap generation (CopyTexImage2D regression)

TRAC #11338 CopyTex(Sub)Image2D was broken by the coordinate space change. Render targets are rendered flipped in the Y axis. Signed-off-by: Nicolas Capens Signed-off-by: Daniel Koch Author: Andrew Lewycky git-svn-id: https://angleproject.googlecode.com/svn/trunk@169 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 4901fca3
...@@ -551,8 +551,8 @@ void Texture2D::copyImage(GLint level, GLenum internalFormat, GLint x, GLint y, ...@@ -551,8 +551,8 @@ void Texture2D::copyImage(GLint level, GLenum internalFormat, GLint x, GLint y,
RECT sourceRect; RECT sourceRect;
sourceRect.left = x; sourceRect.left = x;
sourceRect.right = x + width; sourceRect.right = x + width;
sourceRect.top = source->getHeight() - (y + height); sourceRect.top = y;
sourceRect.bottom = source->getHeight() - y; sourceRect.bottom = y + height;
IDirect3DSurface9 *dest; IDirect3DSurface9 *dest;
HRESULT hr = mTexture->GetSurfaceLevel(level, &dest); HRESULT hr = mTexture->GetSurfaceLevel(level, &dest);
...@@ -586,8 +586,8 @@ void Texture2D::copySubImage(GLint level, GLint xoffset, GLint yoffset, GLint x, ...@@ -586,8 +586,8 @@ void Texture2D::copySubImage(GLint level, GLint xoffset, GLint yoffset, GLint x,
RECT sourceRect; RECT sourceRect;
sourceRect.left = x; sourceRect.left = x;
sourceRect.right = x + width; sourceRect.right = x + width;
sourceRect.top = source->getHeight() - (y + height); sourceRect.top = y;
sourceRect.bottom = source->getHeight() - y; sourceRect.bottom = y + height;
IDirect3DSurface9 *dest; IDirect3DSurface9 *dest;
HRESULT hr = mTexture->GetSurfaceLevel(level, &dest); HRESULT hr = mTexture->GetSurfaceLevel(level, &dest);
...@@ -1230,8 +1230,8 @@ void TextureCubeMap::copyImage(GLenum face, GLint level, GLenum internalFormat, ...@@ -1230,8 +1230,8 @@ void TextureCubeMap::copyImage(GLenum face, GLint level, GLenum internalFormat,
RECT sourceRect; RECT sourceRect;
sourceRect.left = x; sourceRect.left = x;
sourceRect.right = x + width; sourceRect.right = x + width;
sourceRect.top = source->getHeight() - (y + height); sourceRect.top = y;
sourceRect.bottom = source->getHeight() - y; sourceRect.bottom = y + height;
IDirect3DSurface9 *dest = getCubeMapSurface(face, level); IDirect3DSurface9 *dest = getCubeMapSurface(face, level);
...@@ -1297,8 +1297,8 @@ void TextureCubeMap::copySubImage(GLenum face, GLint level, GLint xoffset, GLint ...@@ -1297,8 +1297,8 @@ void TextureCubeMap::copySubImage(GLenum face, GLint level, GLint xoffset, GLint
RECT sourceRect; RECT sourceRect;
sourceRect.left = x; sourceRect.left = x;
sourceRect.right = x + width; sourceRect.right = x + width;
sourceRect.top = source->getHeight() - (y + height); sourceRect.top = y;
sourceRect.bottom = source->getHeight() - y; sourceRect.bottom = y + height;
IDirect3DSurface9 *dest = getCubeMapSurface(face, level); IDirect3DSurface9 *dest = getCubeMapSurface(face, level);
......
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