2012-11-26 20:27:35 +10:00
|
|
|
#ifndef _GL_COMMON_H
|
|
|
|
#define _GL_COMMON_H
|
|
|
|
|
|
|
|
#if defined(USING_GLES2)
|
|
|
|
#if defined(IOS)
|
|
|
|
#include <OpenGLES/ES2/gl.h>
|
|
|
|
#include <OpenGLES/ES2/glext.h>
|
2013-10-08 21:49:37 +02:00
|
|
|
|
|
|
|
// I guess we can soon add ES 3.0 here too
|
|
|
|
|
2012-11-26 20:27:35 +10:00
|
|
|
#else
|
2013-10-08 12:03:02 +02:00
|
|
|
|
|
|
|
// Support OpenGL ES 3.0
|
|
|
|
// This uses the "DYNAMIC" approach from the gles3jni NDK sample.
|
|
|
|
// Should work on non-Android mobile platforms too.
|
|
|
|
#include "../gfx_es2/gl3stub.h"
|
|
|
|
#define MAY_HAVE_GLES3 1
|
|
|
|
// Old way: #include <GLES2/gl2.h>
|
|
|
|
|
2012-11-26 20:27:35 +10:00
|
|
|
#include <GLES2/gl2ext.h>
|
2013-08-23 11:22:59 +03:00
|
|
|
#ifndef MAEMO
|
2013-07-22 01:22:06 +02:00
|
|
|
#include <EGL/egl.h>
|
2013-08-23 11:22:59 +03:00
|
|
|
#endif
|
2013-07-22 01:22:06 +02:00
|
|
|
|
2012-11-26 20:27:35 +10:00
|
|
|
#endif
|
|
|
|
#else // OpenGL
|
2013-10-08 21:49:37 +02:00
|
|
|
// Now that glew is upgraded beyond 4.3, we can define MAY_HAVE_GLES3 on all platforms
|
|
|
|
// that include glew.
|
|
|
|
#define MAY_HAVE_GLES3
|
2012-11-26 20:27:35 +10:00
|
|
|
#include <GL/glew.h>
|
|
|
|
#if defined(__APPLE__)
|
|
|
|
#include <OpenGL/gl.h>
|
|
|
|
#else
|
|
|
|
#include <GL/gl.h>
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2013-01-13 03:09:22 +10:00
|
|
|
#ifndef GLchar
|
2012-12-13 14:39:44 +10:00
|
|
|
typedef char GLchar;
|
|
|
|
#endif
|
|
|
|
|
2012-11-26 20:27:35 +10:00
|
|
|
#endif //_GL_COMMON_H
|