From 325c076d094140fddf11cb291ca45c8a1426f442 Mon Sep 17 00:00:00 2001 From: ruslantproductengine Date: Thu, 26 Oct 2017 18:33:08 +0300 Subject: MAINT-7213 Shared media (media as a texture) unusable with transparent mesh New outline selection around mesh objects. --- indra/llrender/llgl.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'indra/llrender/llgl.h') 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 func) + : LLGLState(state, enable) + { + if (enable) + { + func(); + } + } +}; + /// TODO: Being deprecated. class LLGLEnable : public LLGLState { -- cgit v1.2.3