Turned Image into a class to improve encapsulation.

TRAC #18714 Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@826 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent de631783
...@@ -43,25 +43,38 @@ enum ...@@ -43,25 +43,38 @@ enum
IMPLEMENTATION_MAX_TEXTURE_LEVELS = 15 // 1+log2 of MAX_TEXTURE_SIZE IMPLEMENTATION_MAX_TEXTURE_LEVELS = 15 // 1+log2 of MAX_TEXTURE_SIZE
}; };
struct Image class Image
{ {
public:
Image(); Image();
~Image(); ~Image();
void redefine(GLenum format, GLsizei width, GLsizei height, GLenum type); void redefine(GLenum format, GLsizei width, GLsizei height, GLenum type);
void createSurface(); void createSurface();
void markDirty() {mDirty = true;}
void markClean() {mDirty = false;}
bool isRenderable() const; bool isRenderable() const;
D3DFORMAT getD3DFormat() const; D3DFORMAT getD3DFormat() const;
GLsizei width; GLsizei getWidth() const {return mWidth;}
GLsizei height; GLsizei getHeight() const {return mHeight;}
GLenum format; GLenum getFormat() const {return mFormat;}
GLenum type; GLenum getType() const {return mType;}
bool isDirty() const {return mDirty;}
IDirect3DSurface9 *getSurface() {return mSurface;}
private:
DISALLOW_COPY_AND_ASSIGN(Image);
GLsizei mWidth;
GLsizei mHeight;
GLenum mFormat;
GLenum mType;
bool dirty; bool mDirty;
IDirect3DSurface9 *surface; IDirect3DSurface9 *mSurface;
}; };
class Texture : public RefCountObject class Texture : public RefCountObject
......
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