aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llrender/llgl.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/llrender/llgl.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/linden/indra/llrender/llgl.h b/linden/indra/llrender/llgl.h
index cc7ebff..90642b3 100644
--- a/linden/indra/llrender/llgl.h
+++ b/linden/indra/llrender/llgl.h
@@ -359,6 +359,35 @@ protected:
359 virtual void releaseName(GLuint name) = 0; 359 virtual void releaseName(GLuint name) = 0;
360}; 360};
361 361
362/*
363 Interface for objects that need periodic GL updates applied to them.
364 Used to synchronize GL updates with GL thread.
365*/
366class LLGLUpdate
367{
368public:
369
370 static std::list<LLGLUpdate*> sGLQ;
371
372 BOOL mInQ;
373 LLGLUpdate()
374 : mInQ(FALSE)
375 {
376 }
377 virtual ~LLGLUpdate()
378 {
379 if (mInQ)
380 {
381 std::list<LLGLUpdate*>::iterator iter = std::find(sGLQ.begin(), sGLQ.end(), this);
382 if (iter != sGLQ.end())
383 {
384 sGLQ.erase(iter);
385 }
386 }
387 }
388 virtual void updateGL() = 0;
389};
390
362extern LLMatrix4 gGLObliqueProjectionInverse; 391extern LLMatrix4 gGLObliqueProjectionInverse;
363 392
364#include "llglstates.h" 393#include "llglstates.h"
@@ -377,4 +406,6 @@ void parse_gl_version( S32* major, S32* minor, S32* release, std::string* vendor
377 406
378extern BOOL gClothRipple; 407extern BOOL gClothRipple;
379extern BOOL gNoRender; 408extern BOOL gNoRender;
409extern BOOL gGLActive;
410
380#endif // LL_LLGL_H 411#endif // LL_LLGL_H