mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-04-15 04:10:53 +00:00
Value returned from glGetUniformLocation can == 0 on GLES
This commit is contained in:
parent
ea087c2eee
commit
55a5b0569c
1 changed files with 2 additions and 2 deletions
|
@ -633,11 +633,11 @@ bool FShader::Load(const char * name, const char * vert_prog_lump_, const char *
|
|||
char stringbuf[20];
|
||||
mysnprintf(stringbuf, 20, "texture%d", i);
|
||||
int tempindex = glGetUniformLocation(shaderData->hShader, stringbuf);
|
||||
if (tempindex > 0) glUniform1i(tempindex, i - 1);
|
||||
if (tempindex >= 0) glUniform1i(tempindex, i - 1);
|
||||
}
|
||||
|
||||
int shadowmapindex = glGetUniformLocation(shaderData->hShader, "ShadowMap");
|
||||
if (shadowmapindex > 0) glUniform1i(shadowmapindex, 16);
|
||||
if (shadowmapindex >= 0) glUniform1i(shadowmapindex, 16);
|
||||
|
||||
glUseProgram(0);
|
||||
|
||||
|
|
Loading…
Reference in a new issue