Adds resource manager class.
TRAC #12493
The resource manager class is now in charge of allocation &
management of objects which may be shared by multiple contexts.
Signed-off-by: Andrew Lewycky
Signed-off-by: Nicolas Capens
Signed-off-by: Daniel Koch
Author: Shannon Woods
git-svn-id: https://angleproject.googlecode.com/svn/trunk@360 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libGLESv2/Program.h b/src/libGLESv2/Program.h
index 62e43fb..3021b7a 100644
--- a/src/libGLESv2/Program.h
+++ b/src/libGLESv2/Program.h
@@ -20,6 +20,7 @@
namespace gl
{
+class ResourceManager;
class FragmentShader;
class VertexShader;
@@ -55,7 +56,7 @@
class Program
{
public:
- Program();
+ Program(ResourceManager *manager, GLuint handle);
~Program();
@@ -119,6 +120,9 @@
GLint getActiveUniformCount();
GLint getActiveUniformMaxLength();
+ void addRef();
+ void release();
+ unsigned int getRefCount() const;
void flagForDeletion();
bool isFlaggedForDeletion() const;
@@ -214,9 +218,14 @@
char *mInfoLog;
bool mValidated;
+ unsigned int mRefCount;
+
unsigned int mSerial;
static unsigned int mCurrentSerial;
+
+ ResourceManager *mResourceManager;
+ const GLuint mHandle;
};
}