fix macOS build

This commit is contained in:
Richard Goedeken 2018-01-22 20:07:30 -08:00
parent be939e8d00
commit 7db91f8e74

View file

@ -31,17 +31,7 @@
#define VS_TEXCOORD1 3
#define VS_FOG 4
#ifndef USE_GLES
#ifndef SDL_VIDEO_OPENGL
#error SDL is not build with OpenGL support. Try USE_GLES=1
#endif
#include <SDL_opengl.h>
#define GLSL_VERSION "120"
#else // !USE_GLES
#ifdef USE_GLES
#ifndef SDL_VIDEO_OPENGL_ES2
#error SDL is not build with OpenGL ES2 support. Try USE_GLES=0
@ -73,6 +63,22 @@
#define glReadBuffer(x)
#define glTexEnvi(x,y,z)
#else // !USE_GLES
#ifndef SDL_VIDEO_OPENGL
#error SDL is not build with OpenGL support. Try USE_GLES=1
#endif
#if defined(__APPLE__)
#include <OpenGL/gl.h>
#include <OpenGL/glext.h>
#define APIENTRY
#endif
#include <SDL_opengl.h>
#define GLSL_VERSION "120"
#endif // !USE_GLES
#endif // OSAL_OPENGL_H