mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-13 21:31:32 +00:00
Update r_opengl.c
This commit is contained in:
parent
de5e44cfbc
commit
e251f9c230
1 changed files with 37 additions and 36 deletions
|
@ -739,7 +739,9 @@ EXPORT void HWRAPI(LoadShaders) (void)
|
|||
if (gl_customfragmentshaders[i])
|
||||
frag_shader = gl_customfragmentshaders[i];
|
||||
|
||||
if (i >= MAXSHADERS || i >= MAXSHADERPROGRAMS)
|
||||
if (i >= MAXSHADERS)
|
||||
break;
|
||||
if (i >= MAXSHADERPROGRAMS)
|
||||
break;
|
||||
|
||||
//
|
||||
|
@ -1590,10 +1592,8 @@ static void load_shaders(FSurfaceInfo *Surface, GLRGBAFloat *mix, GLRGBAFloat *f
|
|||
if (gl_shaderprograms[gl_currentshaderprogram])
|
||||
{
|
||||
pglUseProgram(gl_shaderprograms[gl_currentshaderprogram]);
|
||||
|
||||
//
|
||||
// set uniforms
|
||||
//
|
||||
{
|
||||
#define GETUNI(uniform) pglGetUniformLocation(gl_shaderprograms[gl_currentshaderprogram], uniform);
|
||||
GLint UNIFORM_fog_mode = GETUNI("fog_mode");
|
||||
GLint UNIFORM_fog_density = GETUNI("fog_density");
|
||||
|
@ -1639,6 +1639,7 @@ static void load_shaders(FSurfaceInfo *Surface, GLRGBAFloat *mix, GLRGBAFloat *f
|
|||
#undef UNIFORM_3
|
||||
#undef UNIFORM_4
|
||||
}
|
||||
}
|
||||
else
|
||||
pglUseProgram(0);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue