diff options
Diffstat (limited to 'indra/llrender/llgl.h')
-rw-r--r-- | indra/llrender/llgl.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/indra/llrender/llgl.h b/indra/llrender/llgl.h index 00ff1e2f53..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" @@ -50,9 +51,17 @@ #include "glh/glh_linear.h" extern BOOL gDebugGL; +extern BOOL gDebugSession; +extern std::ofstream gFailLog; #define LL_GL_ERRS LL_ERRS("RenderState") +void ll_init_fail_log(std::string filename); + +void ll_fail(std::string msg); + +void ll_close_fail_log(); + class LLSD; // Manage GL extensions... @@ -88,6 +97,7 @@ public: BOOL mHasOcclusionQuery; BOOL mHasPointParameters; BOOL mHasDrawBuffers; + BOOL mHasTextureRectangle; // Other extensions. BOOL mHasAnisotropic; @@ -358,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" @@ -376,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 |