gl.h 1010 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2013, 2017 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_GL_H
  9. #define IGL_OPENGL_GL_H
  10. #ifdef IGL_OPENGL2_GL_H
  11. # error "igl/opengl2/gl.h already included"
  12. #endif
  13. // Always use this:
  14. // #include "gl.h"
  15. // Instead of:
  16. // #include <OpenGL/gl3.h>
  17. // or
  18. // #include <GL/gl.h>
  19. //
  20. // For now this includes glu, glew and glext (perhaps these should be
  21. // separated)
  22. #ifdef _WIN32
  23. # define NOMINMAX
  24. # include <Windows.h>
  25. # undef DrawText
  26. # undef NOMINMAX
  27. #endif
  28. #ifndef __APPLE__
  29. # define GLEW_STATIC
  30. # include <GL/glew.h>
  31. #endif
  32. #ifdef __APPLE__
  33. # include <OpenGL/gl3.h>
  34. # define __gl_h_ /* Prevent inclusion of the old gl.h */
  35. #else
  36. # include <GL/gl.h>
  37. #endif
  38. #endif