summaryrefslogtreecommitdiff
path: root/indra/llrender/llgl.h
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2018-05-31 17:35:35 -0400
committerOz Linden <oz@lindenlab.com>2018-05-31 17:35:35 -0400
commitc0e00cc61750d2b1bba3ada6622023df4725b1a4 (patch)
treef0cc704c8af726f27164cb569cc77e6f55e533d2 /indra/llrender/llgl.h
parente56be73dc646d414c7a10621ac489add6762267b (diff)
parent40d4e8b2e6d25a625c7a5ef5dd3e94321d18ce82 (diff)
merge changes for 5.1.5-release
Diffstat (limited to 'indra/llrender/llgl.h')
-rw-r--r--indra/llrender/llgl.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/indra/llrender/llgl.h b/indra/llrender/llgl.h
index aa98b3f6bc..4c4302d05b 100644
--- a/indra/llrender/llgl.h
+++ b/indra/llrender/llgl.h
@@ -256,6 +256,9 @@ void clear_glerror();
if the existing GL state does not match the expected GL state.
*/
+
+#include "boost/function.hpp"
+
class LLGLState
{
public:
@@ -297,6 +300,20 @@ public:
LLGLEnableAlphaReject(bool enable);
};
+// Enable with functor
+class LLGLEnableFunc : LLGLState
+{
+public:
+ LLGLEnableFunc(LLGLenum state, bool enable, boost::function<void()> func)
+ : LLGLState(state, enable)
+ {
+ if (enable)
+ {
+ func();
+ }
+ }
+};
+
/// TODO: Being deprecated.
class LLGLEnable : public LLGLState
{