Allow blitting to a render texture in BlitFramebuffer.
Change the type check to allow blitting between render buffers and render textures. Store the format for render textures so that resolving to a render texture Colorbuffer will pass the format check.
BUG=37
Review URL: http://codereview.appspot.com/2205043
git-svn-id: https://angleproject.googlecode.com/svn/trunk@430 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libGLESv2/Texture.cpp b/src/libGLESv2/Texture.cpp
index 8d89c1d..226d64c 100644
--- a/src/libGLESv2/Texture.cpp
+++ b/src/libGLESv2/Texture.cpp
@@ -832,6 +832,11 @@
return true;
}
+D3DFORMAT Texture::getD3DFormat() const
+{
+ return selectFormat(getFormat(), mType);
+}
+
IDirect3DBaseTexture9 *Texture::getTexture()
{
if (!isComplete())
@@ -2046,7 +2051,7 @@
}
Texture::TextureColorbufferProxy::TextureColorbufferProxy(Texture *texture, GLenum target)
- : Colorbuffer(NULL), mTexture(texture), mTarget(target)
+ : Colorbuffer(texture), mTexture(texture), mTarget(target)
{
ASSERT(target == GL_TEXTURE_2D || IsCubemapTextureTarget(target));
}