- don't let environmental palettes (like underwater) affect the HUD and menu.

This commit is contained in:
Christoph Oelckers 2020-01-25 18:48:14 +01:00
parent 3d84384678
commit 99c4b6b6d7
2 changed files with 8 additions and 0 deletions

View file

@ -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;
}
}

View file

@ -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);