Compare commits

...
Author SHA1 Message Date
Alec Jacobson 37d04e7683 remove glad includes and loaders 2022-03-24 19:04:19 -04:00
3 changed files with 8 additions and 0 deletions
+4
View File
@@ -20,6 +20,10 @@
// #include <GL/gl.h>
//
#ifdef __APPLE__
#include <OpenGL/gl3.h>
#else
#include <glad/glad.h>
#endif
#endif
+2
View File
@@ -177,11 +177,13 @@ namespace glfw
}
glfwMakeContextCurrent(window);
// Load OpenGL and its extensions
#ifndef __APPLE__
if (!gladLoadGLLoader((GLADloadproc) glfwGetProcAddress))
{
printf("Failed to load OpenGL and its extensions\n");
return(-1);
}
#endif
#if defined(DEBUG) || defined(_DEBUG)
printf("OpenGL Version %d.%d loaded\n", GLVersion.major, GLVersion.minor);
int major, minor, rev;
@@ -17,10 +17,12 @@ IGL_INLINE bool igl::opengl::glfw::background_window(GLFWwindow* & window)
window = glfwCreateWindow(1, 1,"", NULL, NULL);
if(!window) return false;
glfwMakeContextCurrent(window);
#ifndef __APPLE__
if (!gladLoadGLLoader((GLADloadproc) glfwGetProcAddress))
{
printf("Failed to load OpenGL and its extensions");
}
#endif
glGetError(); // pull and safely ignore unhandled errors like GL_INVALID_ENUM
return true;
}