diff options
author | Leith Bade <leith@mapbox.com> | 2014-12-02 03:09:09 +1100 |
---|---|---|
committer | Leith Bade <leith@mapbox.com> | 2014-12-02 03:09:09 +1100 |
commit | 66349e33ab3bde1a7fe901e84c70c04884476f78 (patch) | |
tree | 16b2403b853bb89a2098c1814a55e59c53142d23 | |
parent | 204700ff7e2e45ecc4ce50582988c014626b0dfe (diff) | |
download | qtlocation-mapboxgl-66349e33ab3bde1a7fe901e84c70c04884476f78.tar.gz |
Add GL_ARB_debug_output
-rw-r--r-- | include/mbgl/platform/gl.hpp | 2 | ||||
-rw-r--r-- | platform/default/glfw_view.cpp | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/include/mbgl/platform/gl.hpp b/include/mbgl/platform/gl.hpp index 73d04b7a9e..20e9ae2d63 100644 --- a/include/mbgl/platform/gl.hpp +++ b/include/mbgl/platform/gl.hpp @@ -29,7 +29,7 @@ namespace mbgl { namespace gl { -// GL_KHR_debug +// GL_KHR_debug / GL_ARB_debug_output #define GL_DEBUG_OUTPUT_SYNCHRONOUS 0x8242 #define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH 0x8243 #define GL_DEBUG_CALLBACK_FUNCTION 0x8244 diff --git a/platform/default/glfw_view.cpp b/platform/default/glfw_view.cpp index 0879831d95..802fc10e21 100644 --- a/platform/default/glfw_view.cpp +++ b/platform/default/glfw_view.cpp @@ -85,6 +85,12 @@ void GLFWView::initialize(mbgl::Map *map_) { gl::GetObjectLabel = (gl::PFNGLGETOBJECTLABELPROC)glfwGetProcAddress("glGetObjectLabel"); gl::ObjectPtrLabel = (gl::PFNGLOBJECTPTRLABELPROC)glfwGetProcAddress("glObjectPtrLabel"); gl::GetObjectPtrLabel = (gl::PFNGLGETOBJECTPTRLABELPROC)glfwGetProcAddress("glGetObjectPtrLabel"); + } else if (extensions.find("GL_ARB_debug_output") != std::string::npos) { + gl::DebugMessageControl = (gl::PFNGLDEBUGMESSAGECONTROLPROC)glfwGetProcAddress("glDebugMessageControlARB"); + gl::DebugMessageInsert = (gl::PFNGLDEBUGMESSAGEINSERTPROC)glfwGetProcAddress("glDebugMessageInsertARB"); + gl::DebugMessageCallback = (gl::PFNGLDEBUGMESSAGECALLBACKPROC)glfwGetProcAddress("glDebugMessageCallbackARB"); + gl::GetDebugMessageLog = (gl::PFNGLGETDEBUGMESSAGELOGPROC)glfwGetProcAddress("glGetDebugMessageLogARB"); + gl::GetPointerv = (gl::PFNGLGETPOINTERVPROC)glfwGetProcAddress("glGetPointerv"); } if (extensions.find("GL_ARB_vertex_array_object") != std::string::npos) { |