unhack palrendering screentex stuff

This commit is contained in:
Alug committed 2024-03-02 02:16:28 +01:00
1 parent 8cc71fb13a
commit ef076b4576
1 file changed
+9 -6
+9 -6
View File
@@ -829,12 +829,15 @@ EXPORT void HWRAPI(SetShader) (int slot)
EXPORT void HWRAPI(UnSetShader) (void)
{
gl_shaderstate.current = NULL;
gl_shaderstate.type = 0;
gl_shaderstate.program = 0;
if (gl_shadersenabled) // don't repeatedly call glUseProgram if not needed
{
gl_shaderstate.current = NULL;
gl_shaderstate.type = 0;
gl_shaderstate.program = 0;
if (pglUseProgram)
pglUseProgram(0);
if (pglUseProgram)
pglUseProgram(0);
}
gl_shadersenabled = false;
}
@@ -3253,7 +3256,7 @@ EXPORT void HWRAPI(DrawScreenFinalTexture)(int tex, int width, int height)
pglDrawArrays(GL_TRIANGLE_FAN, 0, 4);
if (HWR_ShouldUsePaletteRendering())
UnSetShader();
pglUseProgram(0);
tex_downloaded = screenTextures[tex];
}