Commit d705a6f0 authored by Felix Paul Kühne's avatar Felix Paul Kühne

opengl: use OpenGL ES 2 on iOS and fix a compilation warning

parent 91f7ead2
...@@ -31,21 +31,22 @@ ...@@ -31,21 +31,22 @@
/* Change USE_OPENGL_ES value to set the OpenGL ES version (1, 2) you want to use /* Change USE_OPENGL_ES value to set the OpenGL ES version (1, 2) you want to use
* A value of 0 will activate normal OpenGL */ * A value of 0 will activate normal OpenGL */
#ifndef USE_OPENGL_ES
# define USE_OPENGL_ES 0
#endif
#ifdef __APPLE__ #ifdef __APPLE__
# include <TargetConditionals.h> # include <TargetConditionals.h>
# if !TARGET_OS_IPHONE # if !TARGET_OS_IPHONE
# define USE_OPENGL_ES 0
# define MACOS_OPENGL # define MACOS_OPENGL
# include <OpenGL/gl.h> # include <OpenGL/gl.h>
# else /* Force ESv1 on iOS */ # else /* Force ESv2 on iOS */
# define USE_OPENGL_ES 1 # define USE_OPENGL_ES 2
# include <OpenGLES/ES1/gl.h> # include <OpenGLES/ES1/gl.h>
# include <OpenGLES/ES2/gl.h> # include <OpenGLES/ES2/gl.h>
# include <OpenGLES/ES2/glext.h> # include <OpenGLES/ES2/glext.h>
# endif # endif
#else /* !defined (__APPLE__) */ #else /* !defined (__APPLE__) */
# ifndef USE_OPENGL_ES
# define USE_OPENGL_ES 0
# endif
# if USE_OPENGL_ES == 2 # if USE_OPENGL_ES == 2
# include <GLES2/gl2.h> # include <GLES2/gl2.h>
# elif USE_OPENGL_ES == 1 # elif USE_OPENGL_ES == 1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment