OpenGL_convenience.h 970 B

12345678910111213141516171819202122232425262728293031323334353637
  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_CONVENIENCE_H
  9. #define IGL_OPENGL_CONVENIENCE_H
  10. #ifndef IGL_NO_OPENGL
  11. // Always use this:
  12. // #include "OpenGL_convenience.h"
  13. // Convenience includer for opengl.
  14. // For now this includes glu, glew and glext (perhaps these should be
  15. // separated)
  16. #if __APPLE__
  17. # include <OpenGL/gl.h>
  18. # include <OpenGL/glu.h>
  19. # include <OpenGL/glext.h>
  20. #elif defined(_WIN32)
  21. # define NOMINMAX
  22. # include <Windows.h>
  23. # undef NOMINMAX
  24. # include <GL/glew.h>
  25. # include <GL/gl.h>
  26. #else
  27. # define GL_GLEXT_PROTOTYPES
  28. # include <GL/gl.h>
  29. # include <GL/glext.h>
  30. # include <GL/glu.h>
  31. #endif
  32. #endif
  33. #endif