From d5eb1008a43548353d15c2c8cdee5993a5f73477 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 8 May 2016 22:07:18 +0200 Subject: [PATCH] - implemented texture overlay pass for textured dynamic lights. --- src/gl/scene/gl_flats.cpp | 6 ++++++ src/gl/scene/gl_walls_draw.cpp | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/src/gl/scene/gl_flats.cpp b/src/gl/scene/gl_flats.cpp index 850a93615..b32139957 100644 --- a/src/gl/scene/gl_flats.cpp +++ b/src/gl/scene/gl_flats.cpp @@ -448,6 +448,12 @@ void GLFlat::Draw(int pass, bool trans) // trans only has meaning for GLPASS_LIG case GLPASS_LIGHTTEX_ADDITIVE: DrawLightsCompat(pass); break; + + case GLPASS_TEXONLY: + gl_RenderState.SetMaterial(gltexture, CLAMP_NONE, 0, -1, false); + gl_SetPlaneTextureRotation(&plane, gltexture); + DrawSubsectors(pass, false, false); + } } diff --git a/src/gl/scene/gl_walls_draw.cpp b/src/gl/scene/gl_walls_draw.cpp index 4fd586388..7bdf5c4dc 100644 --- a/src/gl/scene/gl_walls_draw.cpp +++ b/src/gl/scene/gl_walls_draw.cpp @@ -447,5 +447,10 @@ void GLWall::Draw(int pass) case GLPASS_LIGHTTEX_ADDITIVE: RenderLightsCompat(pass); break; + + case GLPASS_TEXONLY: + gl_RenderState.SetMaterial(gltexture, flags & 3, 0, -1, false); + RenderWall(RWF_TEXTURED); + break; } }