Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'qt/qtoglcontextfactory.hpp')
-rw-r--r--qt/qtoglcontextfactory.hpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/qt/qtoglcontextfactory.hpp b/qt/qtoglcontextfactory.hpp
index 0c75929cef..ea9c4936cd 100644
--- a/qt/qtoglcontextfactory.hpp
+++ b/qt/qtoglcontextfactory.hpp
@@ -3,14 +3,20 @@
#include "drape/oglcontextfactory.hpp"
#include "qt/qtoglcontext.hpp"
-#include <QtGui/QWindow>
+#include <QtGui/QOffscreenSurface>
class QtOGLContextFactory : public dp::OGLContextFactory
{
public:
- QtOGLContextFactory(QWindow * surface);
+ using TRegisterThreadFn = QtRenderOGLContext::TRegisterThreadFn;
+ using TSwapFn = QtRenderOGLContext::TSwapFn;
+
+ QtOGLContextFactory(QOpenGLContext * renderContext, QThread * thread,
+ TRegisterThreadFn const & regFn, TSwapFn const & swapFn);
~QtOGLContextFactory();
+ void shutDown() { m_drawContext->shutDown(); }
+
virtual dp::OGLContext * getDrawContext();
virtual dp::OGLContext * getResourcesUploadContext();
@@ -19,7 +25,7 @@ protected:
virtual bool isUploadContextCreated() const { return m_uploadContext != nullptr; }
private:
- QWindow * m_surface;
- QtOGLContext * m_drawContext;
- QtOGLContext * m_uploadContext;
+ QtRenderOGLContext * m_drawContext;
+ QtUploadOGLContext * m_uploadContext;
+ QOffscreenSurface * m_uploadThreadSurface;
};