소스 검색

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

`gladLoadGL` returns 0 on fail, not the other way around.
Jiří Šebele 7 년 전
부모
커밋
f8b7e4d94f
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      examples/example_sdl_opengl3/main.cpp

+ 1 - 1
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)
     {