Fix checking for floating-point render target texture support.

TRAC #15703 Issue=86 Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@587 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent f4e36037
......@@ -319,8 +319,8 @@ GLenum Framebuffer::completeness()
return GL_FRAMEBUFFER_UNSUPPORTED;
}
if (colorbuffer->isFloatingPoint() && (!getContext()->supportsFloatRenderableTextures() ||
!getContext()->supportsHalfFloatRenderableTextures()))
if ((colorbuffer->getType() == GL_FLOAT && !getContext()->supportsFloatRenderableTextures()) ||
(colorbuffer->getType() == GL_HALF_FLOAT_OES && !getContext()->supportsHalfFloatRenderableTextures()))
{
return GL_FRAMEBUFFER_UNSUPPORTED;
}
......
......@@ -325,24 +325,24 @@ GLenum Colorbuffer::getInternalFormat() const
return mInternalFormat;
}
D3DFORMAT Colorbuffer::getD3DFormat() const
GLenum Colorbuffer::getType() const
{
if (mTexture)
{
return mTexture->getD3DFormat();
return mTexture->getType();
}
return mD3DFormat;
return GL_UNSIGNED_BYTE;
}
bool Colorbuffer::isFloatingPoint() const
D3DFORMAT Colorbuffer::getD3DFormat() const
{
if (mTexture)
{
return mTexture->isFloatingPoint();
return mTexture->getD3DFormat();
}
return false;
return mD3DFormat;
}
bool Colorbuffer::isColorbuffer() const
......
......@@ -128,11 +128,10 @@ class Colorbuffer : public RenderbufferStorage
virtual GLsizei getWidth() const;
virtual GLsizei getHeight() const;
virtual GLenum getInternalFormat() const;
virtual GLenum getType() const;
virtual D3DFORMAT getD3DFormat() const;
bool isFloatingPoint() const;
private:
DISALLOW_COPY_AND_ASSIGN(Colorbuffer);
......
......@@ -165,11 +165,6 @@ GLenum Texture::getWrapT() const
return mWrapT;
}
bool Texture::isFloatingPoint() const
{
return (getType() == GL_FLOAT || getType() == GL_HALF_FLOAT_OES);
}
bool Texture::isRenderableFormat() const
{
D3DFORMAT format = getD3DFormat();
......
......@@ -64,7 +64,6 @@ class Texture : public RefCountObject
virtual bool isComplete() const = 0;
virtual bool isCompressed() const = 0;
bool isFloatingPoint() const;
bool isRenderableFormat() const;
D3DFORMAT getD3DFormat() const;
......
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