2012-11-26 20:27:35 +10:00
|
|
|
#ifndef _GL_COMMON_H
|
|
|
|
#define _GL_COMMON_H
|
|
|
|
|
|
|
|
#if defined(USING_GLES2)
|
2013-10-23 14:55:20 +10:00
|
|
|
#ifdef IOS
|
2014-04-30 11:34:15 +08:00
|
|
|
#include <OpenGLES/ES3/gl.h>
|
|
|
|
#include <OpenGLES/ES3/glext.h>
|
2012-11-26 20:27:35 +10:00
|
|
|
#else
|
2013-10-23 14:55:20 +10:00
|
|
|
#include <GLES2/gl2.h>
|
|
|
|
#include <GLES2/gl2ext.h>
|
2014-05-31 01:21:43 +10:00
|
|
|
#ifndef USING_EGL
|
2013-10-23 14:55:20 +10:00
|
|
|
#include <EGL/egl.h>
|
2014-05-31 01:21:43 +10:00
|
|
|
#endif // !USING_EGL
|
2013-10-23 14:55:20 +10:00
|
|
|
#endif // IOS
|
2014-05-29 12:37:04 +10:00
|
|
|
#if !defined(__SYMBIAN32__) && !defined(MEEGO_EDITION_HARMATTAN) && !defined(MAEMO)
|
2013-10-08 12:03:02 +02:00
|
|
|
// Support OpenGL ES 3.0
|
|
|
|
// This uses the "DYNAMIC" approach from the gles3jni NDK sample.
|
2014-05-29 12:37:04 +10:00
|
|
|
// Should work on desktop and non-Android mobile platforms too.
|
2013-10-08 12:03:02 +02:00
|
|
|
#define MAY_HAVE_GLES3 1
|
2014-05-29 12:37:04 +10:00
|
|
|
#include "../gfx_es2/gl3stub.h"
|
2012-11-26 20:27:35 +10:00
|
|
|
#endif
|
|
|
|
#else // OpenGL
|
2013-10-23 14:55:20 +10:00
|
|
|
// Now that glew is upgraded beyond 4.3, we can define MAY_HAVE_GLES3 on GL platforms
|
|
|
|
#define MAY_HAVE_GLES3 1
|
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-10-23 12:29:09 +02:00
|
|
|
#if !defined(GLchar) && !defined(__APPLE__)
|
2012-12-13 14:39:44 +10:00
|
|
|
typedef char GLchar;
|
|
|
|
#endif
|
|
|
|
|
2012-11-26 20:27:35 +10:00
|
|
|
#endif //_GL_COMMON_H
|