Commit 9206ee9c by Clouds Committed by Tianqi Chen

fix opengl runtime to use OpenGL/gl3.h for macOS (#833)

* fix opengl to OpenGL/gl3.h for APPLE

* use glfw3 to include gl.h header
parent 9a1c7fcc
......@@ -11,7 +11,9 @@
#include <tvm/runtime/packed_func.h>
#include <tvm/runtime/device_api.h>
#include <dmlc/logging.h>
#include <GL/gl.h>
#if defined(__APPLE__)
#define GLFW_INCLUDE_GLCOREARB
#endif
#include <GLFW/glfw3.h>
#include <string>
#include <tuple>
......
......@@ -27,10 +27,12 @@ static const char* GLGetErrorString(GLenum error) {
return "GL_INVALID_VALUE";
case GL_INVALID_OPERATION:
return "GL_INVALID_OPERATION";
#if !defined(__APPLE__)
case GL_STACK_OVERFLOW:
return "GL_STACK_OVERFLOW";
case GL_STACK_UNDERFLOW:
return "GL_STACK_UNDERFLOW";
#endif
case GL_OUT_OF_MEMORY:
return "GL_OUT_OF_MEMORY";
default:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment