From f8b7e4d94feb74d84e331ba47c821138488430c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20=C5=A0ebele?= Date: Mon, 3 Sep 2018 19:36:02 +0200 Subject: [PATCH] Examples: imgui_impl_opengl3 Fix GLAD error condition (#2059, #2002) `gladLoadGL` returns 0 on fail, not the other way around. --- examples/example_sdl_opengl3/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/example_sdl_opengl3/main.cpp b/examples/example_sdl_opengl3/main.cpp index bdd8a9a8b..156520f72 100644 --- a/examples/example_sdl_opengl3/main.cpp +++ b/examples/example_sdl_opengl3/main.cpp @@ -64,7 +64,7 @@ int main(int, char**) #elif defined(IMGUI_IMPL_OPENGL_LOADER_GLEW) bool err = glewInit() != GLEW_OK; #elif defined(IMGUI_IMPL_OPENGL_LOADER_GLAD) - bool err = gladLoadGL() != 0; + bool err = gladLoadGL() == 0; #endif if (err) {