blob: 0c75929cef5c225a29b320e0e23e221534aafa52 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#pragma once
#include "drape/oglcontextfactory.hpp"
#include "qt/qtoglcontext.hpp"
#include <QtGui/QWindow>
class QtOGLContextFactory : public dp::OGLContextFactory
{
public:
QtOGLContextFactory(QWindow * surface);
~QtOGLContextFactory();
virtual dp::OGLContext * getDrawContext();
virtual dp::OGLContext * getResourcesUploadContext();
protected:
virtual bool isDrawContextCreated() const { return m_drawContext != nullptr; }
virtual bool isUploadContextCreated() const { return m_uploadContext != nullptr; }
private:
QWindow * m_surface;
QtOGLContext * m_drawContext;
QtOGLContext * m_uploadContext;
};
|