source: trunk/src/lolgl.h @ 745

Last change on this file since 745 was 745, checked in by sam, 10 years ago

video: enforce shader-enabled GL implementations, getting rid of a lot
of code.

  • Property svn:keywords set to Id
File size: 1.3 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 __DH_LOLGL_H__
17#define __DH_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 HAVE_GL_2X
28#   if defined __APPLE__ && defined __MACH__
29#       include <OpenGL/gl.h>
30#   else
31#       define GL_GLEXT_PROTOTYPES
32#       include <GL/gl.h>
33#   endif
34#elif defined HAVE_GLES_2X
35#   if defined __APPLE__ && defined __MACH__
36#       include <OpenGLES/ES2/gl.h>
37#       include <OpenGLES/ES2/glext.h>
38#   else
39#       include <GLES2/gl2.h>
40#       include <GLES2/gl2ext.h>
41#   endif
42#endif
43
44/* Redefine some function names */
45#if defined HAVE_GL_2X
46#   define glClearDepthf glClearDepth
47#elif defined HAVE_GLES_2X
48#   define glGenVertexArrays glGenVertexArraysOES
49#   define glDeleteVertexArrays glDeleteVertexArraysOES
50#   define glBindVertexArray glBindVertexArrayOES
51#endif
52
53#endif // __DH_LOLGL_H__
54
Note: See TracBrowser for help on using the repository browser.