diff --git a/source/common/rendering/gl/system/gl_framebuffer.cpp b/source/common/rendering/gl/system/gl_framebuffer.cpp index affefa675..77243a103 100644 --- a/source/common/rendering/gl/system/gl_framebuffer.cpp +++ b/source/common/rendering/gl/system/gl_framebuffer.cpp @@ -39,6 +39,7 @@ #include "m_png.h" #include "printf.h" #include "templates.h" +#include "palette.h" #include "glbackend/glbackend.h" #include "gl_load/gl_interface.h" @@ -431,7 +432,10 @@ void OpenGLFrameBuffer::Draw2D() GLRenderer->mBuffers->BindCurrentFB(); ::DrawFullscreenBlends(); DrawRateStuff(); + auto savepal = curbasepal; + if (!GLInterface.NonTransparent255Enabled()) curbasepal = 0; GLInterface.Draw2D(&twodgen); + curbasepal = savepal; } } diff --git a/source/glbackend/glbackend.h b/source/glbackend/glbackend.h index ca281e096..8609f09a2 100644 --- a/source/glbackend/glbackend.h +++ b/source/glbackend/glbackend.h @@ -202,6 +202,10 @@ public: { g_nontransparent255 = on; } + bool NonTransparent255Enabled() + { + return g_nontransparent255; + } void SetVertexBuffer(IVertexBuffer* vb, int offset1, int offset2); void SetIndexBuffer(IIndexBuffer* vb);