source: trunk/src/lolgl.h @ 758

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

ps3: start a minimal PS3 port using PSGL, but not CG yet.

  • 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 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#   elif defined __CELLOS_LV2__
39#       include <PSGL/psgl.h>
40#       include <PSGL/psglu.h>
41#   else
42#       include <GLES2/gl2.h>
43#       include <GLES2/gl2ext.h>
44#   endif
45#endif
46
47/* Redefine some function names */
48#if defined HAVE_GL_2X
49#   define glClearDepthf glClearDepth
50#elif defined HAVE_GLES_2X
51#   define glGenVertexArrays glGenVertexArraysOES
52#   define glDeleteVertexArrays glDeleteVertexArraysOES
53#   define glBindVertexArray glBindVertexArrayOES
54#endif
55
56#endif // __LOL_LOLGL_H__
57
Note: See TracBrowser for help on using the repository browser.