From 3dad4e3b5cf0e5cc0c52fa28fb055ed98f912915 Mon Sep 17 00:00:00 2001 From: archshift Date: Wed, 30 Apr 2014 17:10:38 -0700 Subject: [PATCH] Sets OGL version for Qt; will only work with Qt5 --- src/citra_qt/bootmanager.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/citra_qt/bootmanager.cpp b/src/citra_qt/bootmanager.cpp index 31958ac28..52b39eb27 100644 --- a/src/citra_qt/bootmanager.cpp +++ b/src/citra_qt/bootmanager.cpp @@ -73,11 +73,10 @@ void EmuThread::Stop() class GGLWidgetInternal : public QGLWidget { public: - GGLWidgetInternal(GRenderWindow* parent) : QGLWidget(parent) + GGLWidgetInternal(QGLFormat fmt, GRenderWindow* parent) : QGLWidget(parent) { - setAutoBufferSwap(false); - doneCurrent(); - parent_ = parent; + doneCurrent(); + parent_ = parent; } void paintEvent(QPaintEvent* ev) @@ -103,8 +102,13 @@ EmuThread& GRenderWindow::GetEmuThread() GRenderWindow::GRenderWindow(QWidget* parent) : QWidget(parent), emu_thread(this) { // TODO: One of these flags might be interesting: WA_OpaquePaintEvent, WA_NoBackground, WA_DontShowOnScreen, WA_DeleteOnClose - - child = new GGLWidgetInternal(this); + QGLFormat fmt; + fmt.setProfile(QGLFormat::CoreProfile); + fmt.setVersion(4,1); + fmt.setSampleBuffers(true); + fmt.setSamples(4); + + child = new GGLWidgetInternal(fmt, this); QBoxLayout* layout = new QHBoxLayout(this); resize(VideoCore::kScreenTopWidth, VideoCore::kScreenTopHeight + VideoCore::kScreenBottomHeight); layout->addWidget(child);