You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

60 lines
1.4 KiB

  1. //
  2. // Lol Engine
  3. //
  4. // Copyright: (c) 2010-2011 Sam Hocevar <sam@hocevar.net>
  5. // This program is free software; you can redistribute it and/or
  6. // modify it under the terms of the Do What The Fuck You Want To
  7. // Public License, Version 2, as published by Sam Hocevar. See
  8. // http://sam.zoy.org/projects/COPYING.WTFPL for more details.
  9. //
  10. //
  11. // The GL support
  12. // --------------
  13. //
  14. #if !defined __LOL_LOLGL_H__
  15. #define __LOL_LOLGL_H__
  16. #define GL_GLEXT_PROTOTYPES
  17. /* Only define one GL platform */
  18. #if defined HAVE_GL_2X
  19. # undef HAVE_GLES_2X
  20. #endif
  21. /* Include GL */
  22. #if defined USE_GLEW
  23. # include <GL/glew.h>
  24. #elif defined HAVE_GL_2X
  25. # if defined __APPLE__ && defined __MACH__
  26. # include <OpenGL/gl.h>
  27. # else
  28. # define GL_GLEXT_PROTOTYPES
  29. # include <GL/gl.h>
  30. # endif
  31. #elif defined HAVE_GLES_2X
  32. # if defined __APPLE__ && defined __MACH__
  33. # include <OpenGLES/ES2/gl.h>
  34. # include <OpenGLES/ES2/glext.h>
  35. # elif defined __CELLOS_LV2__
  36. # include <PSGL/psgl.h>
  37. # include <PSGL/psglu.h>
  38. # else
  39. # include <GLES2/gl2.h>
  40. # include <GLES2/gl2ext.h>
  41. # endif
  42. #endif
  43. /* Redefine some function names */
  44. #if defined HAVE_GL_2X
  45. #elif defined HAVE_GLES_2X
  46. # define glClearDepth glClearDepthf
  47. # define glGenVertexArrays glGenVertexArraysOES
  48. # define glDeleteVertexArrays glDeleteVertexArraysOES
  49. # define glBindVertexArray glBindVertexArrayOES
  50. #endif
  51. #endif // __LOL_LOLGL_H__