Some stuff I forgot from ogl-shader-preprocessor

This commit is contained in:
Hannu Hanhi 2021-05-11 01:30:53 +03:00
parent de37df1be0
commit 118fc58192
2 changed files with 3 additions and 13 deletions

View file

@ -302,16 +302,6 @@ enum hwdshaderstage
typedef enum hwdshaderstage hwdshaderstage_t; 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 // Lactozilla: Shader info
// Generally set at the start of the frame. // Generally set at the start of the frame.
enum hwdshaderinfo enum hwdshaderinfo

View file

@ -532,7 +532,7 @@ boolean SetupGLfunc(void)
} }
static boolean gl_shadersenabled = false; static boolean gl_shadersenabled = false;
static hwdshaderoption_t gl_allowshaders = HWD_SHADEROPTION_OFF; static INT32 gl_allowshaders = 0;
#ifdef GL_SHADERS #ifdef GL_SHADERS
typedef GLuint (APIENTRY *PFNglCreateShader) (GLenum); typedef GLuint (APIENTRY *PFNglCreateShader) (GLenum);
@ -796,7 +796,7 @@ EXPORT void HWRAPI(SetShaderInfo) (hwdshaderinfo_t info, INT32 value)
EXPORT void HWRAPI(SetShader) (int slot) EXPORT void HWRAPI(SetShader) (int slot)
{ {
#ifdef GL_SHADERS #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 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; break;
case HWD_SET_SHADERS: case HWD_SET_SHADERS:
gl_allowshaders = (hwdshaderoption_t)Value; gl_allowshaders = Value;
break; break;
case HWD_SET_TEXTUREFILTERMODE: case HWD_SET_TEXTUREFILTERMODE: