Commit d3d2a342 by Jamie Madill

Add methods to return the properties of the base level image of a texture. We…

Add methods to return the properties of the base level image of a texture. We can call these of any texture type. These methods are only well-defined for complete textures (IE, not cube maps with one face defined in one level). TRAC #23957 Signed-off-by: Geoff Lang Signed-off-by: Shannon Woods
parent 93780289
...@@ -90,6 +90,11 @@ class Texture : public RefCountObject ...@@ -90,6 +90,11 @@ class Texture : public RefCountObject
GLenum getUsage() const; GLenum getUsage() const;
virtual int levelCount() = 0; virtual int levelCount() = 0;
GLint getBaseLevelWidth() const;
GLint getBaseLevelHeight() const;
GLint getBaseLevelDepth() const;
GLenum getBaseLevelInternalFormat() const;
virtual bool isSamplerComplete(const SamplerState &samplerState) const = 0; virtual bool isSamplerComplete(const SamplerState &samplerState) const = 0;
rx::TextureStorageInterface *getNativeTexture(); rx::TextureStorageInterface *getNativeTexture();
...@@ -146,6 +151,7 @@ class Texture : public RefCountObject ...@@ -146,6 +151,7 @@ class Texture : public RefCountObject
DISALLOW_COPY_AND_ASSIGN(Texture); DISALLOW_COPY_AND_ASSIGN(Texture);
virtual rx::TextureStorageInterface *getStorage(bool renderTarget) = 0; virtual rx::TextureStorageInterface *getStorage(bool renderTarget) = 0;
virtual const rx::Image *getBaseLevelImage() const = 0;
}; };
class Texture2D : public Texture class Texture2D : public Texture
...@@ -192,6 +198,7 @@ class Texture2D : public Texture ...@@ -192,6 +198,7 @@ class Texture2D : public Texture
virtual void updateTexture(); virtual void updateTexture();
virtual void convertToRenderTarget(); virtual void convertToRenderTarget();
virtual rx::TextureStorageInterface *getStorage(bool renderTarget); virtual rx::TextureStorageInterface *getStorage(bool renderTarget);
virtual const rx::Image *getBaseLevelImage() const;
bool isMipmapComplete() const; bool isMipmapComplete() const;
bool isLevelComplete(int level) const; bool isLevelComplete(int level) const;
...@@ -257,6 +264,7 @@ class TextureCubeMap : public Texture ...@@ -257,6 +264,7 @@ class TextureCubeMap : public Texture
virtual void updateTexture(); virtual void updateTexture();
virtual void convertToRenderTarget(); virtual void convertToRenderTarget();
virtual rx::TextureStorageInterface *getStorage(bool renderTarget); virtual rx::TextureStorageInterface *getStorage(bool renderTarget);
virtual const rx::Image *getBaseLevelImage() const;
bool isCubeComplete() const; bool isCubeComplete() const;
bool isMipmapCubeComplete() const; bool isMipmapCubeComplete() const;
...@@ -314,8 +322,8 @@ class Texture3D : public Texture ...@@ -314,8 +322,8 @@ class Texture3D : public Texture
virtual void createTexture(); virtual void createTexture();
virtual void updateTexture(); virtual void updateTexture();
virtual void convertToRenderTarget(); virtual void convertToRenderTarget();
virtual rx::TextureStorageInterface *getStorage(bool renderTarget); virtual rx::TextureStorageInterface *getStorage(bool renderTarget);
virtual const rx::Image *getBaseLevelImage() const;
void redefineImage(GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth); void redefineImage(GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth);
void commitRect(GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth); void commitRect(GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth);
...@@ -370,8 +378,8 @@ class Texture2DArray : public Texture ...@@ -370,8 +378,8 @@ class Texture2DArray : public Texture
virtual void createTexture(); virtual void createTexture();
virtual void updateTexture(); virtual void updateTexture();
virtual void convertToRenderTarget(); virtual void convertToRenderTarget();
virtual rx::TextureStorageInterface *getStorage(bool renderTarget); virtual rx::TextureStorageInterface *getStorage(bool renderTarget);
virtual const rx::Image *getBaseLevelImage() const;
void redefineImage(GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth); void redefineImage(GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth);
void commitRect(GLint level, GLint xoffset, GLint yoffset, GLint layerTarget, GLsizei width, GLsizei height); void commitRect(GLint level, GLint xoffset, GLint yoffset, GLint layerTarget, GLsizei width, GLsizei height);
......
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