浏览代码

missing opengl convenience header

Former-commit-id: dd005e897ac988903d80600ac3a04131a71b6819
Alec Jacobson (jalec 11 年之前
父节点
当前提交
159d285d8d
共有 1 个文件被更改,包括 29 次插入0 次删除
  1. 29 0
      include/igl/OpenGL_convenience.h

+ 29 - 0
include/igl/OpenGL_convenience.h

@@ -0,0 +1,29 @@
+#ifndef OPENGL_CONVENIENCE_H
+#define OPENGL_CONVENIENCE_H
+#ifndef IGL_NO_OPENGL
+
+// Always use this:
+//     #include "OpenGL_convenience.h"
+// Convenience includer for opengl.
+
+// For now this includes glu, glew and glext (perhaps these should be
+// separated)
+#if __APPLE__
+#  include <OpenGL/gl.h>
+#  include <OpenGL/glu.h>
+#elif defined(_WIN32)
+#    define NOMINMAX
+#    include <Windows.h>
+#    undef NOMINMAX
+#    include <GL/glew.h>
+#    include <GL/gl.h>
+#else
+#  define GL_GLEXT_PROTOTYPES
+#  include <GL/gl.h>
+#  include <GL/glext.h>
+#  include <GL/glu.h>
+#endif
+
+#endif
+#endif
+