Fix building on Visual Studio after GLAD & Polymost changes

git-svn-id: https://svn.eduke32.com/eduke32@6671 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
pogokeen 2018-02-17 06:38:15 +00:00
parent 97de73a760
commit d6926cb7d3
4 changed files with 1524 additions and 1476 deletions

View file

@ -385,17 +385,21 @@ static GLuint polymost2_compileShader(GLenum shaderType, const char* const sourc
NULL);
glCompileShader(shaderID);
int compileStatus[1];
glGetShaderiv(shaderID, GL_COMPILE_STATUS, compileStatus);
OSD_Printf("Compile Status: %u\n", compileStatus[0]);
GLint compileStatus;
glGetShaderiv(shaderID, GL_COMPILE_STATUS, &compileStatus);
OSD_Printf("Compile Status: %u\n", compileStatus);
int logLength[1];
glGetShaderiv(shaderID, GL_INFO_LOG_LENGTH, logLength);
if (logLength[0] > 0)
if (!compileStatus)
{
char infoLog[logLength[0]];
glGetShaderInfoLog(shaderID, logLength[0], NULL, infoLog);
OSD_Printf("Log:\n%s\n", infoLog);
GLint logLength;
glGetShaderiv(shaderID, GL_INFO_LOG_LENGTH, &logLength);
if (logLength > 0)
{
char *infoLog = (char*) malloc(logLength);
glGetShaderInfoLog(shaderID, logLength, &logLength, infoLog);
OSD_Printf("Log:\n%s\n", infoLog);
free(infoLog);
}
}
return shaderID;