From 5bf722a1fbf8fa3475b136efb606a20ad06fdb31 Mon Sep 17 00:00:00 2001 From: alufolie91 Date: Tue, 12 Sep 2023 01:50:46 +0200 Subject: [PATCH] only allow this thing when shaders are enabled aswell yes i will do it like that no i wont use gl_allowshaders i want this thing to be able to affect the menus and hud, just like software :p --- src/hardware/r_opengl/r_opengl.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/hardware/r_opengl/r_opengl.c b/src/hardware/r_opengl/r_opengl.c index 8c496f163..e18c142b4 100644 --- a/src/hardware/r_opengl/r_opengl.c +++ b/src/hardware/r_opengl/r_opengl.c @@ -32,6 +32,8 @@ #include "../../p_tick.h" // for leveltime (NOTE: THIS IS BAD, FIGURE OUT HOW TO PROPERLY IMPLEMENT gl_leveltime) #include "../../i_system.h" // for I_GetPreciseTime (batching time measurements) +#include "../hw_main.h" + // Eeeeh not sure is this right way, but it works < sry :c //extern consvar_t cv_grusecustomshaders; @@ -4078,7 +4080,7 @@ EXPORT void HWRAPI(DrawScreenFinalTexture)(int width, int height) ClearBuffer(true, false, false, &clearColour); pglBindTexture(GL_TEXTURE_2D, finalScreenTexture); - if (gl_use_palette_shader) + if (gl_use_palette_shader && cv_grshaders.value) { pglUseProgram(gl_shaderprograms[8].program); // palette shader pglUniform1iv(gl_shaderprograms[8].uniforms[gluniform_palette], 768, gl_palette); @@ -4093,7 +4095,7 @@ EXPORT void HWRAPI(DrawScreenFinalTexture)(int width, int height) tex_downloaded = finalScreenTexture; - if (gl_use_palette_shader) + if (gl_use_palette_shader && cv_grshaders.value) { pglUseProgram(0); pglActiveTexture(GL_TEXTURE0);