summaryrefslogtreecommitdiffstats
path: root/src/extras/custompipes_gl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/extras/custompipes_gl.cpp')
-rw-r--r--src/extras/custompipes_gl.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/extras/custompipes_gl.cpp b/src/extras/custompipes_gl.cpp
index 5717c83b..01663df5 100644
--- a/src/extras/custompipes_gl.cpp
+++ b/src/extras/custompipes_gl.cpp
@@ -203,6 +203,11 @@ worldRenderCB(rw::Atomic *atomic, rw::gl3::InstanceDataHeader *header)
using namespace rw;
using namespace rw::gl3;
+ if(!LightmapEnable){
+ gl3::defaultRenderCB(atomic, header);
+ return;
+ }
+
Material *m;
setWorldMatrix(atomic->getFrame()->getLTM());
@@ -315,6 +320,8 @@ glossRenderCB(rw::Atomic *atomic, rw::gl3::InstanceDataHeader *header)
using namespace rw::gl3;
worldRenderCB(atomic, header);
+ if(!GlossEnable)
+ return;
Material *m;
@@ -442,6 +449,11 @@ rimSkinRenderCB(rw::Atomic *atomic, rw::gl3::InstanceDataHeader *header)
using namespace rw;
using namespace rw::gl3;
+ if(!RimlightEnable){
+ gl3::skinRenderCB(atomic, header);
+ return;
+ }
+
Material *m;
setWorldMatrix(atomic->getFrame()->getLTM());
@@ -487,6 +499,11 @@ rimRenderCB(rw::Atomic *atomic, rw::gl3::InstanceDataHeader *header)
using namespace rw;
using namespace rw::gl3;
+ if(!RimlightEnable){
+ gl3::defaultRenderCB(atomic, header);
+ return;
+ }
+
Material *m;
setWorldMatrix(atomic->getFrame()->getLTM());