summaryrefslogtreecommitdiff
path: root/indra/llrender/llgl.h
diff options
context:
space:
mode:
authorDavid Parks <davep@lindenlab.com>2009-09-22 11:11:45 +0000
committerDavid Parks <davep@lindenlab.com>2009-09-22 11:11:45 +0000
commit536e38ad51b89808f26d8e3cd107fe093862d22a (patch)
tree230159ae9e319f5c419f1a643177b2bbb17d52c5 /indra/llrender/llgl.h
parent760adead96e62cab8f9cdacc6469773a87dfbc1a (diff)
Merging render-pipeline-6-qa-2 into viewer-2
Self reviewed.
Diffstat (limited to 'indra/llrender/llgl.h')
-rw-r--r--indra/llrender/llgl.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/indra/llrender/llgl.h b/indra/llrender/llgl.h
index 34dd982259..91421f3c95 100644
--- a/indra/llrender/llgl.h
+++ b/indra/llrender/llgl.h
@@ -37,6 +37,7 @@
#include <string>
#include <map>
+#include <list>
#include "llerror.h"
#include "v4color.h"
@@ -367,6 +368,35 @@ protected:
virtual void releaseName(GLuint name) = 0;
};
+/*
+ Interface for objects that need periodic GL updates applied to them.
+ Used to synchronize GL updates with GL thread.
+*/
+class LLGLUpdate
+{
+public:
+
+ static std::list<LLGLUpdate*> sGLQ;
+
+ BOOL mInQ;
+ LLGLUpdate()
+ : mInQ(FALSE)
+ {
+ }
+ virtual ~LLGLUpdate()
+ {
+ if (mInQ)
+ {
+ std::list<LLGLUpdate*>::iterator iter = std::find(sGLQ.begin(), sGLQ.end(), this);
+ if (iter != sGLQ.end())
+ {
+ sGLQ.erase(iter);
+ }
+ }
+ }
+ virtual void updateGL() = 0;
+};
+
extern LLMatrix4 gGLObliqueProjectionInverse;
#include "llglstates.h"
@@ -385,4 +415,6 @@ void parse_gl_version( S32* major, S32* minor, S32* release, std::string* vendor
extern BOOL gClothRipple;
extern BOOL gNoRender;
+extern BOOL gGLActive;
+
#endif // LL_LLGL_H