OpenGL_convenience.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2013 Alec Jacobson <alecjacobson@gmail.com>
  4. //
  5. // This Source Code Form is subject to the terms of the Mozilla Public License
  6. // v. 2.0. If a copy of the MPL was not distributed with this file, You can
  7. // obtain one at http://mozilla.org/MPL/2.0/.
  8. #ifndef IGL_OPENGL_OPENGL_CONVENIENCE_H
  9. #define IGL_OPENGL_OPENGL_CONVENIENCE_H
  10. // Always use this:
  11. // #include "OpenGL_convenience.h"
  12. // Convenience includer for opengl.
  13. // For now this includes glu, glew and glext (perhaps these should be
  14. // separated)
  15. /*#if __APPLE__
  16. # include <OpenGL/gl.h>
  17. # include <OpenGL/glu.h>
  18. # include <OpenGL/glext.h>
  19. #elif defined(_WIN32)
  20. # define NOMINMAX
  21. # include <Windows.h>
  22. # undef NOMINMAX
  23. # include <GL/glew.h>
  24. # include <GL/gl.h>
  25. #else
  26. # define GL_GLEXT_PROTOTYPES
  27. # include <GL/gl.h>
  28. # include <GL/glext.h>
  29. # include <GL/glu.h>
  30. #endif*/
  31. // From Nanogui
  32. #if defined(__APPLE__)
  33. #define GLFW_INCLUDE_GLCOREARB
  34. #elif defined(WIN32)
  35. #define GLEW_STATIC
  36. #include <GL/glew.h>
  37. #else
  38. #define GLEW_STATIC
  39. #include <GL/glew.h>
  40. #define GL_GLEXT_PROTOTYPES
  41. #endif
  42. //#define GLFW_INCLUDE_GLU
  43. #include <GLFW/glfw3.h>
  44. #endif