From d5eb1008a43548353d15c2c8cdee5993a5f73477 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 8 May 2016 22:07:18 +0200 Subject: [PATCH 1/2] - 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; } } From 15c711f2a16b75ec8d1dffc57022a41f4dfeceac Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 9 May 2016 00:58:55 +0200 Subject: [PATCH 2/2] - added a missing break in the wall draw dispatcher. --- src/gl/scene/gl_flats.cpp | 2 +- src/gl/scene/gl_walls_draw.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gl/scene/gl_flats.cpp b/src/gl/scene/gl_flats.cpp index b32139957..cbc5d3451 100644 --- a/src/gl/scene/gl_flats.cpp +++ b/src/gl/scene/gl_flats.cpp @@ -453,7 +453,7 @@ void GLFlat::Draw(int pass, bool trans) // trans only has meaning for GLPASS_LIG gl_RenderState.SetMaterial(gltexture, CLAMP_NONE, 0, -1, false); gl_SetPlaneTextureRotation(&plane, gltexture); DrawSubsectors(pass, false, false); - + break; } } diff --git a/src/gl/scene/gl_walls_draw.cpp b/src/gl/scene/gl_walls_draw.cpp index 7bdf5c4dc..a7cd23d42 100644 --- a/src/gl/scene/gl_walls_draw.cpp +++ b/src/gl/scene/gl_walls_draw.cpp @@ -442,6 +442,7 @@ void GLWall::Draw(int pass) RenderTranslucentWall(); break; } + break; case GLPASS_LIGHTTEX: case GLPASS_LIGHTTEX_ADDITIVE: