Commit 9c074a39 by Jamie Madill

Add queries for level and layer to FBO attachments.

BUG=angle:660 Change-Id: I03e76dd7743267dc0b57cf53a4d27cd75a5d5adf Reviewed-on: https://chromium-review.googlesource.com/201837Tested-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarShannon Woods <shannonwoods@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent 218b6ede
......@@ -115,6 +115,16 @@ GLenum Texture2DAttachment::type() const
return GL_TEXTURE_2D;
}
GLint Texture2DAttachment::mipLevel() const
{
return mLevel;
}
GLint Texture2DAttachment::layer() const
{
return 0;
}
unsigned int Texture2DAttachment::getTextureSerial() const
{
return mTexture2D->getTextureSerial();
......@@ -200,6 +210,16 @@ GLenum TextureCubeMapAttachment::type() const
return mFaceTarget;
}
GLint TextureCubeMapAttachment::mipLevel() const
{
return mLevel;
}
GLint TextureCubeMapAttachment::layer() const
{
return 0;
}
unsigned int TextureCubeMapAttachment::getTextureSerial() const
{
return mTextureCubeMap->getTextureSerial();
......@@ -285,6 +305,16 @@ GLenum Texture3DAttachment::type() const
return GL_TEXTURE_3D;
}
GLint Texture3DAttachment::mipLevel() const
{
return mLevel;
}
GLint Texture3DAttachment::layer() const
{
return mLayer;
}
unsigned int Texture3DAttachment::getTextureSerial() const
{
return mTexture3D->getTextureSerial();
......@@ -368,6 +398,16 @@ GLenum Texture2DArrayAttachment::type() const
return GL_TEXTURE_2D_ARRAY;
}
GLint Texture2DArrayAttachment::mipLevel() const
{
return mLevel;
}
GLint Texture2DArrayAttachment::layer() const
{
return mLayer;
}
unsigned int Texture2DArrayAttachment::getTextureSerial() const
{
return mTexture2DArray->getTextureSerial();
......@@ -545,6 +585,16 @@ GLuint FramebufferAttachment::type() const
return mImpl->type();
}
GLint FramebufferAttachment::mipLevel() const
{
return mImpl->mipLevel();
}
GLint FramebufferAttachment::layer() const
{
return mImpl->layer();
}
unsigned int FramebufferAttachment::getTextureSerial() const
{
return mImpl->getTextureSerial();
......@@ -625,6 +675,16 @@ GLenum RenderbufferAttachment::type() const
return GL_RENDERBUFFER;
}
GLint RenderbufferAttachment::mipLevel() const
{
return 0;
}
GLint RenderbufferAttachment::layer() const
{
return 0;
}
unsigned int RenderbufferAttachment::getTextureSerial() const
{
UNREACHABLE();
......
......@@ -76,6 +76,8 @@ class FramebufferAttachment : public RefCountObject
GLuint id() const;
GLenum type() const;
GLint mipLevel() const;
GLint layer() const;
unsigned int getTextureSerial() const;
void setImplementation(FramebufferAttachmentImpl *newImpl);
......@@ -110,6 +112,8 @@ class FramebufferAttachmentImpl
virtual GLuint id() const = 0;
virtual GLenum type() const = 0;
virtual GLint mipLevel() const = 0;
virtual GLint layer() const = 0;
virtual unsigned int getTextureSerial() const = 0;
private:
......@@ -140,6 +144,8 @@ class Texture2DAttachment : public FramebufferAttachmentImpl
virtual GLuint id() const;
virtual GLenum type() const;
virtual GLint mipLevel() const;
virtual GLint layer() const;
virtual unsigned int getTextureSerial() const;
private:
......@@ -173,6 +179,8 @@ class TextureCubeMapAttachment : public FramebufferAttachmentImpl
virtual GLuint id() const;
virtual GLenum type() const;
virtual GLint mipLevel() const;
virtual GLint layer() const;
virtual unsigned int getTextureSerial() const;
private:
......@@ -207,6 +215,8 @@ class Texture3DAttachment : public FramebufferAttachmentImpl
virtual GLuint id() const;
virtual GLenum type() const;
virtual GLint mipLevel() const;
virtual GLint layer() const;
virtual unsigned int getTextureSerial() const;
private:
......@@ -241,6 +251,8 @@ class Texture2DArrayAttachment : public FramebufferAttachmentImpl
virtual GLuint id() const;
virtual GLenum type() const;
virtual GLint mipLevel() const;
virtual GLint layer() const;
virtual unsigned int getTextureSerial() const;
private:
......@@ -272,6 +284,8 @@ class RenderbufferAttachment : public FramebufferAttachmentImpl
virtual GLuint id() const;
virtual GLenum type() const;
virtual GLint mipLevel() const;
virtual GLint layer() const;
virtual unsigned int getTextureSerial() const;
private:
......
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