OpenGL2: Misc fixes and cleanup

Fix two constants in GLSL shaders. Remove f suffix from float and fix
int to float assignment. They were causing shader compile errors in
OpenGL ES 2 context.

Remove disabling clip plane. Clip plane is unused and never enabled in
the opengl2 renderer. Remove disabling it to avoid causing a GL error
when using OpenGL 3.2 core profile or OpenGL ES.

Make VAO cache vertex stride be size of srfVert_t since that is what
is uploaded to the GPU. No behavior change. There is a disabled debug
id in srfVert_t though which if enabled changes srfVert_t size.
This commit is contained in:
Zack Middleton 2018-07-20 23:40:35 -05:00
parent 14cc4cc6cb
commit 39e2113c73
11 changed files with 28 additions and 53 deletions

View file

@ -331,17 +331,6 @@ static void GLSL_GetShaderHeader( GLenum shaderType, const GLchar *extra, char *
AGEN_LIGHTING_SPECULAR,
AGEN_PORTAL));
Q_strcat(dest, size,
va("#ifndef texenv_t\n"
"#define texenv_t\n"
"#define TEXENV_MODULATE %i\n"
"#define TEXENV_ADD %i\n"
"#define TEXENV_REPLACE %i\n"
"#endif\n",
GL_MODULATE,
GL_ADD,
GL_REPLACE));
fbufWidthScale = 1.0f / ((float)glConfig.vidWidth);
fbufHeightScale = 1.0f / ((float)glConfig.vidHeight);
Q_strcat(dest, size,