From 500a60debc838ce394606c364957b7bebaaa1905 Mon Sep 17 00:00:00 2001 From: hesiod Date: Sun, 7 Oct 2018 16:14:24 +0000 Subject: [PATCH] Examples: OpenGL3: Cast compile/link status to GLboolean (#2112, #2125) Some OpenGL loaders/bindings do not allow comparisons between GLints and GLbooleans. --- examples/imgui_impl_opengl3.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/imgui_impl_opengl3.cpp b/examples/imgui_impl_opengl3.cpp index 8c58fb12..11109817 100644 --- a/examples/imgui_impl_opengl3.cpp +++ b/examples/imgui_impl_opengl3.cpp @@ -330,7 +330,7 @@ static bool CheckProgram(GLuint handle, const char* desc) GLint status = 0, log_length = 0; glGetProgramiv(handle, GL_LINK_STATUS, &status); glGetProgramiv(handle, GL_INFO_LOG_LENGTH, &log_length); - if (status == GL_FALSE) + if ((GLboolean)status == GL_FALSE) fprintf(stderr, "ERROR: ImGui_ImplOpenGL3_CreateDeviceObjects: failed to link %s!\n", desc); if (log_length > 0) { @@ -339,7 +339,7 @@ static bool CheckProgram(GLuint handle, const char* desc) glGetProgramInfoLog(handle, log_length, NULL, (GLchar*)buf.begin()); fprintf(stderr, "%s\n", buf.begin()); } - return status == GL_TRUE; + return (GLboolean)status == GL_TRUE; } bool ImGui_ImplOpenGL3_CreateDeviceObjects()