dont prep shaders if theyre uneeded

This commit is contained in:
Alug committed 2023-12-19 17:34:15 +01:00
1 parent fa67dd74a0
commit 6028e392f0
1 file changed
+3 -4
+3 -4
View File
@@ -4504,12 +4504,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);
}