source: trunk/src/lolgl.h @ 954

Last change on this file since 954 was 954, checked in by sam, 8 years ago

build: fix GLEW usage to use <glew.h>, not <GL/glew.h>.

  • Property svn:keywords set to Id
File size: 1.4 KB
Line 
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//
12// The GL support
13// --------------
14//
15
16#if !defined __LOL_LOLGL_H__
17#define __LOL_LOLGL_H__
18
19#define GL_GLEXT_PROTOTYPES
20
21/* Only define one GL platform */
22#if defined HAVE_GL_2X
23#   undef HAVE_GLES_2X
24#endif
25
26/* Include GL */
27#if defined USE_GLEW
28#   include <glew.h>
29#elif defined HAVE_GL_2X
30#   if defined __APPLE__ && defined __MACH__
31#       include <OpenGL/gl.h>
32#   else
33#       define GL_GLEXT_PROTOTYPES
34#       include <GL/gl.h>
35#   endif
36#elif defined HAVE_GLES_2X
37#   if defined __APPLE__ && defined __MACH__
38#       include <OpenGLES/ES2/gl.h>
39#       include <OpenGLES/ES2/glext.h>
40#   elif defined __CELLOS_LV2__
41#       include <PSGL/psgl.h>
42#       include <PSGL/psglu.h>
43#   else
44#       include <GLES2/gl2.h>
45#       include <GLES2/gl2ext.h>
46#   endif
47#endif
48
49/* Redefine some function names */
50#if defined HAVE_GL_2X
51#elif defined HAVE_GLES_2X
52#   define glClearDepth glClearDepthf
53#   define glGenVertexArrays glGenVertexArraysOES
54#   define glDeleteVertexArrays glDeleteVertexArraysOES
55#   define glBindVertexArray glBindVertexArrayOES
56#endif
57
58#endif // __LOL_LOLGL_H__
59
Note: See TracBrowser for help on using the repository browser.