Labyrinth
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
opengl.hpp
1 //////////////////////////////
2 //
3 // File: helper/opengl.h
4 // Author: Maciej Kaminski
5 // E-mail: maciej.a.kaminski@gmail.com
6 // Website: maciejkaminski.pl
7 //
8 // File creation date: Feb 10 2013
9 // This file is part of Project Labyrinth
10 // This file is going to be released under terms of GNU GPL in near future
11 //
12 //////////////////////////////
13 
14 #ifndef __OPENGL_H_
15 #define __OPENGL_H_
16 
17 #if ((defined(__FreeBSD__)))
18 # define NO_OPENGL
19 #elif ((defined(X11LXS)) && (!defined(LINUX_GLES)))
20 # define DESKTOP_OPENGL
21 #else
22 # define EMBEDED_OPENGL
23 #endif
24 
25 #ifdef NO_OPENGL
26 typedef float GLfloat;
27 #elif defined X11LXS// Desktop
28 # define GL_GLEXT_PROTOTYPES
29 # include <GL/gl.h>
30 # include <GL/glx.h> // X11
31 # include <X11/X.h> // X11
32 # include <X11/Xlib.h> // X11
33 # include <GL/glu.h>
34 # ifdef __APPLE__ //Mac OS
35 # include <GL/glext.h>
36 # define glClearDepthf glClearDepth
37 # elif LINUX // Linux
38 # include <GLES2/gl2.h> // for types like GLfloat used by lxscamera
39 # include <EGL/egl.h>
40 # endif
41 #else // PHONE
42 # ifdef __APPLE__ // iOS
43 # include <OpenGLES/ES2/gl.h>
44 # else // Android/ non-apple GL ES system
45 # include <GLES2/gl2.h>
46 # include <EGL/egl.h>
47 # endif
48 #endif
49 
50 #endif