summaryrefslogtreecommitdiff
path: root/src/yuzu/bootmanager.h
diff options
context:
space:
mode:
authorJames Rowe <jroweboy@gmail.com>2019-01-11 21:06:34 -0700
committerJames Rowe <jroweboy@gmail.com>2019-01-21 16:00:01 -0700
commitc6a0ab9792390fefa816ace846e3a76a85e8b4d5 (patch)
tree5bb2281e4ca19bb6f1a809282047ddb61b0b0d63 /src/yuzu/bootmanager.h
parent125599c2d51fba0bb9466d92382631ed7f34bed9 (diff)
QT Frontend: Migrate to QOpenGLWindow
Diffstat (limited to 'src/yuzu/bootmanager.h')
-rw-r--r--src/yuzu/bootmanager.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/yuzu/bootmanager.h b/src/yuzu/bootmanager.h
index d1f37e503..d2a440d0d 100644
--- a/src/yuzu/bootmanager.h
+++ b/src/yuzu/bootmanager.h
@@ -7,9 +7,9 @@
#include <atomic>
#include <condition_variable>
#include <mutex>
-#include <QGLWidget>
#include <QImage>
#include <QThread>
+#include <QWidget>
#include "common/thread.h"
#include "core/core.h"
#include "core/frontend/emu_window.h"
@@ -21,6 +21,8 @@ class QTouchEvent;
class GGLWidgetInternal;
class GMainWindow;
class GRenderWindow;
+class QSurface;
+class QOpenGLContext;
class EmuThread : public QThread {
Q_OBJECT
@@ -115,6 +117,7 @@ public:
void MakeCurrent() override;
void DoneCurrent() override;
void PollEvents() override;
+ std::unique_ptr<Core::Frontend::GraphicsContext> CreateSharedContext() const override;
void BackupGeometry();
void RestoreGeometry();
@@ -168,6 +171,11 @@ private:
QByteArray geometry;
EmuThread* emu_thread;
+ // Context that backs the GGLWidgetInternal (and will be used by core to render)
+ std::unique_ptr<QOpenGLContext> context;
+ // Context that will be shared between all newly created contexts. This should never be made
+ // current
+ std::unique_ptr<QOpenGLContext> shared_context;
/// Temporary storage of the screenshot taken
QImage screenshot_image;