Examples: imgui_impl_opengl3 Fix GLAD error condition (#2059, #2002)

`gladLoadGL` returns 0 on fail, not the other way around.
This commit is contained in:
Jiří Šebele 2018-09-03 19:36:02 +02:00 committed by omar
parent d07f494305
commit f8b7e4d94f

View File

@ -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)
{