Skip to content

Commit

Permalink
Update CNFGFunctions.c
Browse files Browse the repository at this point in the history
Remove clang prohibition on glGetShaderInfoLog... This was an issue for a very narrow set of cases back in the day that are as far as I can tell, that issue is gone now.
  • Loading branch information
cnlohr authored Oct 20, 2024
1 parent 3381321 commit 766a732
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions CNFGFunctions.c
Original file line number Diff line number Diff line change
Expand Up @@ -676,12 +676,9 @@ GLuint CNFGGLInternalLoadShader( const char * vertex_shader, const char * fragme
CNFGglGetShaderiv(vertex_shader_object, GL_INFO_LOG_LENGTH, &ret);

if (ret > 1) {
//TODO: Refactor to remove malloc reliance.
#ifndef __clang__
char * log = (char*)alloca(ret);
char * log = (char*)alloca(ret+1);
CNFGglGetShaderInfoLog(vertex_shader_object, ret, NULL, log);
fprintf( stderr, "%s", log);
#endif
}
goto fail;
}
Expand All @@ -702,13 +699,9 @@ GLuint CNFGGLInternalLoadShader( const char * vertex_shader, const char * fragme
CNFGglGetShaderiv(fragment_shader_object, GL_INFO_LOG_LENGTH, &ret);

if (ret > 1) {
//TODO: Refactor to remove malloc reliance.
#ifndef __clang__
char * log = (char*)malloc(ret);
char * log = (char*)alloca(ret+1);
CNFGglGetShaderInfoLog(fragment_shader_object, ret, NULL, log);
fprintf( stderr, "%s", log);
free( log );
#endif
}
goto fail;
}
Expand Down

0 comments on commit 766a732

Please sign in to comment.