Skip to content

Commit

Permalink
CRender: Fix stack corruption.
Browse files Browse the repository at this point in the history
  • Loading branch information
CrossVR committed Nov 28, 2015
1 parent 0dbd45b commit 99a5494
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Layers/xrRenderPC_GL/rgl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -907,18 +907,18 @@ HRESULT CRender::shader_compile(
xr_free(*it);

// Get the compilation result
GLboolean status;
CHK_GL(glGetShaderiv(shader, GL_COMPILE_STATUS, (GLint*)&status));
GLint status;
CHK_GL(glGetShaderiv(shader, GL_COMPILE_STATUS, &status));

// Link program if compilation succeeded
GLchar* _pErrorMsgs = NULL;
if (status == GL_TRUE) {
if ((GLboolean)status == GL_TRUE) {
CHK_GL(glAttachShader(program, shader));
CHK_GL(glLinkProgram(program));
CHK_GL(glDetachShader(program, shader));
CHK_GL(glGetProgramiv(program, GL_LINK_STATUS, (GLint*)&status));
CHK_GL(glGetProgramiv(program, GL_LINK_STATUS, &status));

if (status == GL_FALSE)
if ((GLboolean)status == GL_FALSE)
{
GLint length;
CHK_GL(glGetProgramiv(program, GL_INFO_LOG_LENGTH, &length));
Expand All @@ -934,7 +934,7 @@ HRESULT CRender::shader_compile(
CHK_GL(glGetShaderInfoLog(shader, length, nullptr, _pErrorMsgs));
}

if (status == GL_FALSE) {
if ((GLboolean)status == GL_FALSE) {
Msg("! shader compilation failed");
Log("! ", name);
if (_pErrorMsgs)
Expand Down

0 comments on commit 99a5494

Please sign in to comment.