- Backend update from GZDoom

* music system improvements
* Zip64 support
* fixes for menu scaling on ultrawide screens
* Mac default paths fixed
* lightmap code (not active yet)
This commit is contained in:
Christoph Oelckers 2022-04-25 11:13:55 +02:00
parent 380864d6fb
commit 21b4862460
48 changed files with 906 additions and 144 deletions

View file

@ -300,6 +300,7 @@ bool FShader::Load(const char * name, const char * vert_prog_lump, const char *
// textures
uniform sampler2D tex;
uniform sampler2D ShadowMap;
uniform sampler2DArray LightMap;
uniform sampler2D texture2;
uniform sampler2D texture3;
uniform sampler2D texture4;
@ -621,11 +622,14 @@ bool FShader::Load(const char * name, const char * vert_prog_lump, const char *
char stringbuf[20];
mysnprintf(stringbuf, 20, "texture%d", i);
tempindex = glGetUniformLocation(hShader, stringbuf);
if (tempindex > 0) glUniform1i(tempindex, i - 1);
if (tempindex != -1) glUniform1i(tempindex, i - 1);
}
int shadowmapindex = glGetUniformLocation(hShader, "ShadowMap");
if (shadowmapindex > 0) glUniform1i(shadowmapindex, 16);
if (shadowmapindex != -1) glUniform1i(shadowmapindex, 16);
int lightmapindex = glGetUniformLocation(hShader, "LightMap");
if (lightmapindex != -1) glUniform1i(lightmapindex, 17);
glUseProgram(0);
return linked;