summaryrefslogtreecommitdiff
path: root/include/mbgl/platform/gl.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/mbgl/platform/gl.hpp')
-rw-r--r--include/mbgl/platform/gl.hpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/mbgl/platform/gl.hpp b/include/mbgl/platform/gl.hpp
index a29b230dbf..cc2a681d42 100644
--- a/include/mbgl/platform/gl.hpp
+++ b/include/mbgl/platform/gl.hpp
@@ -26,9 +26,12 @@
#elif TARGET_OS_MAC
#include <OpenGL/OpenGL.h>
#include <OpenGL/gl.h>
- #define glGenVertexArrays glGenVertexArraysAPPLE
- #define glBindVertexArray glBindVertexArrayAPPLE
- #define glDeleteVertexArrays glDeleteVertexArraysAPPLE
+ #if GL_APPLE_vertex_array_object
+ #define GL_ARB_vertex_array_object 1
+ #define glGenVertexArrays glGenVertexArraysAPPLE
+ #define glBindVertexArray glBindVertexArrayAPPLE
+ #define glDeleteVertexArrays glDeleteVertexArraysAPPLE
+ #endif
#else
#error Unsupported Apple platform
#endif