From 118fc581927eddeae1befd5c43951df1bf1af75b Mon Sep 17 00:00:00 2001 From: Hannu Hanhi Date: Tue, 11 May 2021 01:30:53 +0300 Subject: [PATCH] Some stuff I forgot from ogl-shader-preprocessor --- src/hardware/hw_defs.h | 10 ---------- src/hardware/r_opengl/r_opengl.c | 6 +++--- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/src/hardware/hw_defs.h b/src/hardware/hw_defs.h index 2d9751477..bbf9d8424 100644 --- a/src/hardware/hw_defs.h +++ b/src/hardware/hw_defs.h @@ -302,16 +302,6 @@ enum hwdshaderstage typedef enum hwdshaderstage hwdshaderstage_t; -// Lactozilla: Shader options -enum hwdshaderoption -{ - HWD_SHADEROPTION_OFF, - HWD_SHADEROPTION_ON, - HWD_SHADEROPTION_NOCUSTOM, -}; - -typedef enum hwdshaderoption hwdshaderoption_t; - // Lactozilla: Shader info // Generally set at the start of the frame. enum hwdshaderinfo diff --git a/src/hardware/r_opengl/r_opengl.c b/src/hardware/r_opengl/r_opengl.c index eb7f9e1e4..9321934b7 100644 --- a/src/hardware/r_opengl/r_opengl.c +++ b/src/hardware/r_opengl/r_opengl.c @@ -532,7 +532,7 @@ boolean SetupGLfunc(void) } static boolean gl_shadersenabled = false; -static hwdshaderoption_t gl_allowshaders = HWD_SHADEROPTION_OFF; +static INT32 gl_allowshaders = 0; #ifdef GL_SHADERS typedef GLuint (APIENTRY *PFNglCreateShader) (GLenum); @@ -796,7 +796,7 @@ EXPORT void HWRAPI(SetShaderInfo) (hwdshaderinfo_t info, INT32 value) EXPORT void HWRAPI(SetShader) (int slot) { #ifdef GL_SHADERS - if (gl_allowshaders != HWD_SHADEROPTION_OFF) + if (gl_allowshaders) { gl_shader_t *next_shader = &gl_shaders[slot]; // the gl_shader_t we are going to switch to @@ -2160,7 +2160,7 @@ EXPORT void HWRAPI(SetSpecialState) (hwdspecialstate_t IdState, INT32 Value) break; case HWD_SET_SHADERS: - gl_allowshaders = (hwdshaderoption_t)Value; + gl_allowshaders = Value; break; case HWD_SET_TEXTUREFILTERMODE: