Skip to content

Commit

Permalink
fix macOS build
Browse files Browse the repository at this point in the history
  • Loading branch information
richard42 committed Jan 23, 2018
1 parent be939e8 commit 7db91f8
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions src/osal_opengl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

0 comments on commit 7db91f8

Please sign in to comment.