summaryrefslogtreecommitdiff
path: root/src/mbgl/gl
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2019-03-15 13:54:42 +0100
committerKonstantin Käfer <mail@kkaefer.com>2019-03-20 15:40:47 +0100
commit52cf9a1af385113cee523ce826d7c86c8739e0a2 (patch)
tree700bfe591f1fc322376772d4a4a5c5e51b192c7d /src/mbgl/gl
parent11cacb3f8c67edb5962c8785900095846a2a11bf (diff)
downloadqtlocation-mapboxgl-52cf9a1af385113cee523ce826d7c86c8739e0a2.tar.gz
[core] remove gl/context.hpp from more files, cast where necessary
Diffstat (limited to 'src/mbgl/gl')
-rw-r--r--src/mbgl/gl/debugging.cpp6
-rw-r--r--src/mbgl/gl/debugging.hpp9
2 files changed, 9 insertions, 6 deletions
diff --git a/src/mbgl/gl/debugging.cpp b/src/mbgl/gl/debugging.cpp
index 7b8121f003..54cee5fc09 100644
--- a/src/mbgl/gl/debugging.cpp
+++ b/src/mbgl/gl/debugging.cpp
@@ -9,8 +9,8 @@ using namespace platform;
#ifndef NDEBUG
-DebugGroup::DebugGroup(const Context& context_, const std::string& name) : context(context_) {
- if (auto debugging = context.getDebuggingExtension()) {
+DebugGroup::DebugGroup(const gfx::Context& context_, const std::string& name) : context(context_) {
+ if (auto debugging = reinterpret_cast<const gl::Context&>(context).getDebuggingExtension()) {
if (debugging->pushDebugGroup) {
MBGL_CHECK_ERROR(debugging->pushDebugGroup(GL_DEBUG_SOURCE_APPLICATION, 0, GLsizei(name.size()), name.c_str()));
} else if (debugging->pushGroupMarkerEXT) {
@@ -20,7 +20,7 @@ DebugGroup::DebugGroup(const Context& context_, const std::string& name) : conte
}
DebugGroup::~DebugGroup() {
- if (auto debugging = context.getDebuggingExtension()) {
+ if (auto debugging = reinterpret_cast<const gl::Context&>(context).getDebuggingExtension()) {
if (debugging->popDebugGroup) {
MBGL_CHECK_ERROR(debugging->popDebugGroup());
} else if (debugging->popGroupMarkerEXT) {
diff --git a/src/mbgl/gl/debugging.hpp b/src/mbgl/gl/debugging.hpp
index d24b727295..d85eb631be 100644
--- a/src/mbgl/gl/debugging.hpp
+++ b/src/mbgl/gl/debugging.hpp
@@ -5,19 +5,22 @@
#include <string>
namespace mbgl {
-namespace gl {
+namespace gfx {
class Context;
+} // namespace gfx
+
+namespace gl {
#ifndef NDEBUG
class DebugGroup : private util::noncopyable {
public:
- DebugGroup(const Context&, const std::string&);
+ DebugGroup(const gfx::Context&, const std::string&);
~DebugGroup();
private:
- const Context& context;
+ const gfx::Context& context;
};
#define __MBGL_DEBUG_GROUP_NAME2(counter) __MBGL_DEBUG_GROUP_##counter