Commit 10b411df by Jamie Madill

Add a helper method to gl::RenderTarget to return the extents of the texture (width/height/depth).

TRAC #23841 Signed-off-by: Geoff Lang Signed-off-by: Shannon Woods
parent c2da55cc
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#define LIBGLESV2_RENDERER_RENDERTARGET_H_ #define LIBGLESV2_RENDERER_RENDERTARGET_H_
#include "common/angleutils.h" #include "common/angleutils.h"
#include "libGLESv2/angletypes.h"
namespace rx namespace rx
{ {
...@@ -29,12 +30,13 @@ class RenderTarget ...@@ -29,12 +30,13 @@ class RenderTarget
virtual ~RenderTarget() {}; virtual ~RenderTarget() {};
GLsizei getWidth() { return mWidth; } GLsizei getWidth() const { return mWidth; }
GLsizei getHeight() { return mHeight; } GLsizei getHeight() const { return mHeight; }
GLsizei getDepth() { return mDepth; } GLsizei getDepth() const { return mDepth; }
GLenum getInternalFormat() { return mInternalFormat; } GLenum getInternalFormat() const { return mInternalFormat; }
GLenum getActualFormat() { return mActualFormat; } GLenum getActualFormat() const { return mActualFormat; }
GLsizei getSamples() { return mSamples; } GLsizei getSamples() const { return mSamples; }
gl::Extents getExtents() const { return gl::Extents(mWidth, mHeight, mDepth); }
virtual void invalidate(GLint x, GLint y, GLsizei width, GLsizei height) = 0; virtual void invalidate(GLint x, GLint y, GLsizei width, GLsizei height) = 0;
......
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