summaryrefslogtreecommitdiff
path: root/src/mbgl/map
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2017-02-27 18:33:16 +0100
committerJohn Firebaugh <john.firebaugh@gmail.com>2017-03-23 14:50:11 -0700
commite67abfbe67d7c08e90fdbd8727c4e9ed17dfa1ed (patch)
tree8bf1a6ae813afdfe44bd8d6210337141acd53bae /src/mbgl/map
parent234384ece9c70f2a803ed2b1d1eb55b248ec43d1 (diff)
downloadqtlocation-mapboxgl-e67abfbe67d7c08e90fdbd8727c4e9ed17dfa1ed.tar.gz
[core] Refactor OpenGL extension loading mechanism
Previously, we initialized global variables that held pointers to the extension functions. While this seemed to work, the spec doesn't guarantee that the function pointers are identical for different OpenGL contexts. Therefore, we are now making them a member variable of the Context object.
Diffstat (limited to 'src/mbgl/map')
-rw-r--r--src/mbgl/map/backend.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mbgl/map/backend.cpp b/src/mbgl/map/backend.cpp
index 29f7522e4f..c228719ba6 100644
--- a/src/mbgl/map/backend.cpp
+++ b/src/mbgl/map/backend.cpp
@@ -14,8 +14,8 @@ gl::Context& Backend::getContext() {
assert(BackendScope::exists());
std::call_once(initialized, [this] {
context = std::make_unique<gl::Context>();
- gl::debugging::enable();
- gl::initializeExtensions(
+ context->enableDebugging();
+ context->initializeExtensions(
std::bind(&Backend::initializeExtension, this, std::placeholders::_1));
});
return *context;