dont prep shaders if theyre uneeded

This commit is contained in:
Alug committed 2023-12-19 17:38:13 +01:00
1 parent 661dfde6af
commit 769d93c7da
1 file changed
+3 -4
+3 -4
View File
@@ -4453,12 +4453,11 @@ EXPORT void HWRAPI(DrawScreenFinalTexture)(int width, int height)
clearColour.alpha = 1;
ClearBuffer(true, false, false, &clearColour);
pglBindTexture(GL_TEXTURE_2D, finalScreenTexture);
// prepare shader, if it is enabled
Shader_SetUniforms(NULL, NULL, NULL, NULL);
if (HWR_ShouldUsePaletteRendering())
{
Shader_SetUniforms(NULL, NULL, NULL, NULL); // prepare shader, if it is enabled
pglUseProgram(gl_shaderprograms[8].program); // palette shader
pglActiveTexture(GL_TEXTURE1);
}