Skip to content

Commit

Permalink
Examples: imgui_impl_opengl3 Fix GLAD error condition (#2059, #2002)
Browse files Browse the repository at this point in the history
`gladLoadGL` returns 0 on fail, not the other way around.
  • Loading branch information
jiri authored and ocornut committed Sep 3, 2018
1 parent d07f494 commit f8b7e4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/example_sdl_opengl3/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit f8b7e4d

Please sign in to comment.