#include #include #include #include namespace mbgl { class QtBackendImpl : public HeadlessBackend::Impl { public: ~QtBackendImpl() final = default; gl::ProcAddress getExtensionFunctionPointer(const char* name) final { QOpenGLContext* thisContext = QOpenGLContext::currentContext(); return thisContext->getProcAddress(name); } void activateContext() final { widget.makeCurrent(); } void deactivateContext() final { widget.doneCurrent(); } private: QGLWidget widget; }; void HeadlessBackend::createImpl() { assert(!impl); impl = std::make_unique(); } } // namespace mbgl