Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
acgl
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ACGL
acgl
Commits
938376b3
Commit
938376b3
authored
Jan 06, 2013
by
Robert Menzel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added andoid includes
parent
e4615c1f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
84 additions
and
53 deletions
+84
-53
include/ACGL/OpenGL/GL.hh
include/ACGL/OpenGL/GL.hh
+84
-53
No files found.
include/ACGL/OpenGL/GL.hh
View file @
938376b3
...
...
@@ -38,48 +38,15 @@
* (full/compatibility profile).
*/
// To compare the OpenGL version number we define a new ACGL_OPENGL_VERSION XY define here
// analog to ACGL_OPENGL_VERSION_XY
#if defined (ACGL_OPENGL_VERSION_21)
# define ACGL_OPENGL_VERSION 21
#elif defined (ACGL_OPENGL_VERSION_30)
# define ACGL_OPENGL_VERSION 30
#elif defined (ACGL_OPENGL_VERSION_31)
# define ACGL_OPENGL_VERSION 31
#elif defined (ACGL_OPENGL_VERSION_32)
# define ACGL_OPENGL_VERSION 32
#elif defined (ACGL_OPENGL_VERSION_33)
# define ACGL_OPENGL_VERSION 33
#elif defined (ACGL_OPENGL_VERSION_40)
# define ACGL_OPENGL_VERSION 40
#elif defined (ACGL_OPENGL_VERSION_41)
# define ACGL_OPENGL_VERSION 41
#elif defined (ACGL_OPENGL_VERSION_42)
# define ACGL_OPENGL_VERSION 42
#elif defined (ACGL_OPENGL_VERSION_43)
# define ACGL_OPENGL_VERSION 43
#else
#if defined (ACGL_OPENGL_INCLUDE_LATEST_GL)
#define ACGL_OPENGL_VERSION_43
#define ACGL_OPENGL_VERSION 43
#define ACGL_OPENGL_PROFILE_FULL
#else
// fallback:
#warning "NO ACGL_OPENGL_VERSION_XY SET! Default to 3.2 core (but load all available functions)"
// *we* only assume OpenGL 3.2 core...
#define ACGL_OPENGL_VERSION_32
#define ACGL_OPENGL_VERSION 32
#define ACGL_OPENGL_PROFILE_CORE
// ... but include the latest header and try to load all function in case the app needs more:
// (only if the internal loader gets used, but GLEW will also try to load everything)
#define ACGL_OPENGL_INCLUDE_LATEST_GL
#endif // latest GL
#endif // version checks
// Android:
#ifdef __ANDROID__
# define ACGL_OPENGL_ES
# define PLATFORM_ANDROID
#endif
// If we're compiling for an Apple system we need this to distinquish between Mac and iOS:
#ifdef __APPLE__
#
include <TargetConditionals.h>
#
include <TargetConditionals.h>
#endif
#if (defined(TARGET_OS_IPHONE) || defined(TARGET_IPHONE_SIMULATOR))
...
...
@@ -87,16 +54,66 @@
# define PLATFORM_IOS
# define ACGL_OPENGL_ES
# endif
#else
// no iOS device...
# ifdef ACGL_PLATFORM_MOBILE
// ...but mobile:
// maybe maemo or android: first one to program for these plattforms should add
// the correct includes here!
# define ACGL_OPENGL_ES
# endif
#endif
//manually enforced ES:
#ifdef ACGL_PLATFORM_MOBILE
// ...but mobile:
// maybe maemo or android: first one to program for these plattforms should add
// the correct includes here!
# define ACGL_OPENGL_ES
#endif
// To compare the OpenGL version number we define a new ACGL_OPENGL_VERSION XY define here
// analog to ACGL_OPENGL_VERSION_XY
// OpenGL ES 2.0 is the default for embedded:
#ifdef ACGL_OPENGL_ES
# if defined (ACGL_OPENGLES_VERSION_30)
# define ACGL_OPENGLES_VERSION 30
# else
# define ACGL_OPENGLES_VERSION_20
# define ACGL_OPENGLES_VERSION 20
# endif
#else
// Desktop:
#if defined (ACGL_OPENGL_VERSION_21)
# define ACGL_OPENGL_VERSION 21
#elif defined (ACGL_OPENGL_VERSION_30)
# define ACGL_OPENGL_VERSION 30
#elif defined (ACGL_OPENGL_VERSION_31)
# define ACGL_OPENGL_VERSION 31
#elif defined (ACGL_OPENGL_VERSION_32)
# define ACGL_OPENGL_VERSION 32
#elif defined (ACGL_OPENGL_VERSION_33)
# define ACGL_OPENGL_VERSION 33
#elif defined (ACGL_OPENGL_VERSION_40)
# define ACGL_OPENGL_VERSION 40
#elif defined (ACGL_OPENGL_VERSION_41)
# define ACGL_OPENGL_VERSION 41
#elif defined (ACGL_OPENGL_VERSION_42)
# define ACGL_OPENGL_VERSION 42
#elif defined (ACGL_OPENGL_VERSION_43)
# define ACGL_OPENGL_VERSION 43
#else
#if defined (ACGL_OPENGL_INCLUDE_LATEST_GL)
#define ACGL_OPENGL_VERSION_43
#define ACGL_OPENGL_VERSION 43
#define ACGL_OPENGL_PROFILE_FULL
#else
// fallback:
#warning "NO ACGL_OPENGL_VERSION_XY SET! Default to 3.2 core (but load all available functions)"
// *we* only assume OpenGL 3.2 core...
#define ACGL_OPENGL_VERSION_32
#define ACGL_OPENGL_VERSION 32
#define ACGL_OPENGL_PROFILE_CORE
// ... but include the latest header and try to load all function in case the app needs more:
// (only if the internal loader gets used, but GLEW will also try to load everything)
#define ACGL_OPENGL_INCLUDE_LATEST_GL
#endif // latest GL
#endif // version checks
#endif // OpenGL ES
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
...
...
@@ -106,14 +123,28 @@
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#ifdef ACGL_OPENGL_ES
#if (
defined(__APPLE__) || defined(MACOSX)
)
#if (
PLATFORM_IOS
)
//iOS:
#import <OpenGLES/ES1/gl.h>
#import <OpenGLES/ES1/glext.h>
#import <OpenGLES/ES2/gl.h>
#import <OpenGLES/ES2/glext.h>
#if defined (ACGL_OPENGLES_VERSION_20)
#import <OpenGLES/ES1/gl.h>
#import <OpenGLES/ES1/glext.h>
#import <OpenGLES/ES2/gl.h>
#import <OpenGLES/ES2/glext.h>
#else
#error "location of ES 3 headers not known"
#endif
#elif defined (PLATFORM_ANDROID)
// Android:
#if defined (ACGL_OPENGLES_VERSION_20)
//#include <GLES/gl.h>
//#include <GLES/glext.h>
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
#else
#include <GLES3/gl3.h>
#include <GLES3/gl3ext.h>
#endif
#else
// Android et al.:
#error "UNKNOWN mobile plattform! Don't know what to include!"
#endif
#else // ACGL_OPENGL_ES
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment