Forráskód Böngészése

Added some extra debugging for when glewInit fails, should make it easy to debug #128

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
Alexis Maiquez 3 éve
szülő
commit
08586dcab6
1 módosított fájl, 3 hozzáadás és 2 törlés
  1. 3 2
      main.cpp

+ 3 - 2
main.cpp

@@ -462,10 +462,11 @@ int main (int argc, char* argv[])
     // get the real framebuffer size
     glfwGetFramebufferSize (window, &windowWidth, &windowHeight);
 
+    GLenum glewInitResult = glewInit ();
     // initialize glew
-    if (glewInit () != GLEW_OK)
+    if (glewInitResult != GLEW_OK)
     {
-        fprintf (stderr, "Failed to initialize GLEW");
+        fprintf (stderr, "Failed to initialize GLEW: %s", glewGetErrorString (glewInitResult));
         glfwTerminate ();
         return 3;
     }