Skip to content

Commit 09aed65

Browse files
committed
Fix using wrong OpenGL function on shader compilation error
1 parent 9a15b16 commit 09aed65

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

impl/gui/gl/src/gui_gl_renderer.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -337,15 +337,15 @@ GLuint create_shader(GLenum type, const char* shader_source) {
337337
glCompileShader(shader);
338338

339339
// Check sucess
340-
GLint compiled = 0;
340+
GLint compiled = GL_FALSE;
341341
glGetShaderiv(shader, GL_COMPILE_STATUS, &compiled);
342-
if (compiled == 0) {
342+
if (compiled == GL_FALSE) {
343343
GLint info_length = 0;
344-
glGetProgramiv(shader, GL_INFO_LOG_LENGTH, &info_length);
344+
glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &info_length);
345345

346346
std::vector<char> error_message(std::max(1, info_length), '\0');
347347
if (info_length > 1) {
348-
glGetProgramInfoLog(shader, info_length, NULL, error_message.data());
348+
glGetShaderInfoLog(shader, info_length, NULL, error_message.data());
349349
}
350350

351351
glDeleteShader(shader);

0 commit comments

Comments
 (0)