Browse Source

Update glad backend. (#2012)

Jérémie Dumas 3 years ago
parent
commit
91f6c503f6

+ 1 - 1
cmake/recipes/external/glad.cmake

@@ -8,7 +8,7 @@ include(FetchContent)
 FetchContent_Declare(
     glad
     GIT_REPOSITORY https://github.com/libigl/libigl-glad.git
-    GIT_TAG        09b4969c56779f7ddf8e6176ec1873184aec890f
+    GIT_TAG        ceef55fcd08bdd16e985370a99cfb60e69623221
 )
 
 FetchContent_MakeAvailable(glad)

+ 1 - 1
include/igl/opengl/gl.h

@@ -20,6 +20,6 @@
 //     #include <GL/gl.h>
 //
 
-#include <glad/glad.h>
+#include <glad/gl.h>
 
 #endif

+ 1 - 1
include/igl/opengl/glfw/Viewer.cpp

@@ -178,7 +178,7 @@ namespace glfw
     }
     glfwMakeContextCurrent(window);
     // Load OpenGL and its extensions
-    if (!gladLoadGLLoader((GLADloadproc) glfwGetProcAddress))
+    if (!gladLoadGL((GLADloadfunc) glfwGetProcAddress))
     {
       printf("Failed to load OpenGL and its extensions\n");
       return(-1);

+ 1 - 1
include/igl/opengl/glfw/background_window.cpp

@@ -17,7 +17,7 @@ IGL_INLINE bool igl::opengl::glfw::background_window(GLFWwindow* & window)
   window = glfwCreateWindow(1, 1,"", NULL, NULL);
   if(!window) return false;
   glfwMakeContextCurrent(window);
-  if (!gladLoadGLLoader((GLADloadproc) glfwGetProcAddress))
+  if (!gladLoadGL((GLADloadfunc) glfwGetProcAddress))
   {
     printf("Failed to load OpenGL and its extensions");
   }