2 // Copyright (c) 2002-2012 The ANGLE Project Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
7 // Image.h: Defines the rx::Image class, an abstract base class for the
8 // renderer-specific classes which will define the interface to the underlying
9 // surfaces or resources.
11 #ifndef LIBGLESV2_RENDERER_IMAGE_H_
12 #define LIBGLESV2_RENDERER_IMAGE_H_
14 #include "common/debug.h"
16 #include <GLES2/gl2.h>
34 GLsizei getWidth() const { return mWidth; }
35 GLsizei getHeight() const { return mHeight; }
36 GLsizei getDepth() const { return mDepth; }
37 GLenum getInternalFormat() const { return mInternalFormat; }
38 GLenum getActualFormat() const { return mActualFormat; }
39 GLenum getTarget() const { return mTarget; }
40 bool isRenderableFormat() const { return mRenderable; }
42 void markDirty() {mDirty = true;}
43 void markClean() {mDirty = false;}
44 virtual bool isDirty() const = 0;
46 virtual bool redefine(Renderer *renderer, GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, bool forceRelease) = 0;
48 virtual void loadData(GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth,
49 GLint unpackAlignment, GLenum type, const void *input) = 0;
50 virtual void loadCompressedData(GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth,
51 const void *input) = 0;
53 virtual void copy(GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height, gl::Framebuffer *source) = 0;
59 GLenum mInternalFormat;
67 DISALLOW_COPY_AND_ASSIGN(Image);
72 #endif // LIBGLESV2_RENDERER_IMAGE_H_