summaryrefslogtreecommitdiff
path: root/platform/default/glfw_view.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'platform/default/glfw_view.cpp')
-rw-r--r--platform/default/glfw_view.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/platform/default/glfw_view.cpp b/platform/default/glfw_view.cpp
index 7f8ca69944..34b9ddbef1 100644
--- a/platform/default/glfw_view.cpp
+++ b/platform/default/glfw_view.cpp
@@ -73,7 +73,13 @@ void GLFWView::initialize(mbgl::Map *map_) {
{
using namespace mbgl;
- if (extensions.find("GL_APPLE_vertex_array_object") != std::string::npos) {
+
+ if (extensions.find("GL_ARB_vertex_array_object") != std::string::npos) {
+ gl::BindVertexArray = (gl::PFNGLBINDVERTEXARRAYPROC)glfwGetProcAddress("glBindVertexArrayARB");
+ gl::DeleteVertexArrays = (gl::PFNGLDELETEVERTEXARRAYSPROC)glfwGetProcAddress("glDeleteVertexArraysARB");
+ gl::GenVertexArrays = (gl::PFNGLGENVERTEXARRAYSPROC)glfwGetProcAddress("glGenVertexArraysARB");
+ gl::IsVertexArray = (gl::PFNGLISVERTEXARRAYPROC)glfwGetProcAddress("glIsVertexArrayARB");
+ } else if (extensions.find("GL_APPLE_vertex_array_object") != std::string::npos) {
gl::BindVertexArray = (gl::PFNGLBINDVERTEXARRAYPROC)glfwGetProcAddress("glBindVertexArrayAPPLE");
gl::DeleteVertexArrays = (gl::PFNGLDELETEVERTEXARRAYSPROC)glfwGetProcAddress("glDeleteVertexArraysAPPLE");
gl::GenVertexArrays = (gl::PFNGLGENVERTEXARRAYSPROC)glfwGetProcAddress("glGenVertexArraysAPPLE");