summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Yuri Kunde Schlesner2014-08-30 18:17:47 -0300
committerGravatar Tony Wasserka2014-10-12 14:39:02 +0200
commitac54cd13dbb8e82ccc9134aab212271d2f32b0c8 (patch)
tree9eb2c6feaa64d889b9b46b4b5bedd1bb4e185ec9
parentRework OpenGL renderer. (diff)
downloadyuzu-ac54cd13dbb8e82ccc9134aab212271d2f32b0c8.tar.gz
yuzu-ac54cd13dbb8e82ccc9134aab212271d2f32b0c8.tar.xz
yuzu-ac54cd13dbb8e82ccc9134aab212271d2f32b0c8.zip
OpenGL renderer: Request a forward compatible context in citra-qt
This should fix context creation on OS X. Also requests a core context on all platforms in Citra-GLFW, for consistency.
-rw-r--r--src/citra/emu_window/emu_window_glfw.cpp3
-rw-r--r--src/citra_qt/bootmanager.cpp6
2 files changed, 3 insertions, 6 deletions
diff --git a/src/citra/emu_window/emu_window_glfw.cpp b/src/citra/emu_window/emu_window_glfw.cpp
index 661521eb7..6cdba2b87 100644
--- a/src/citra/emu_window/emu_window_glfw.cpp
+++ b/src/citra/emu_window/emu_window_glfw.cpp
@@ -42,12 +42,9 @@ EmuWindow_GLFW::EmuWindow_GLFW() {
42 } 42 }
43 glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); 43 glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
44 glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 2); 44 glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 2);
45
46#if EMU_PLATFORM == PLATFORM_MACOSX
47 // GLFW on OSX requires these window hints to be set to create a 3.2+ GL context. 45 // GLFW on OSX requires these window hints to be set to create a 3.2+ GL context.
48 glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); 46 glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
49 glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); 47 glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
50#endif
51 48
52 m_render_window = glfwCreateWindow(VideoCore::kScreenTopWidth, 49 m_render_window = glfwCreateWindow(VideoCore::kScreenTopWidth,
53 (VideoCore::kScreenTopHeight + VideoCore::kScreenBottomHeight), 50 (VideoCore::kScreenTopHeight + VideoCore::kScreenBottomHeight),
diff --git a/src/citra_qt/bootmanager.cpp b/src/citra_qt/bootmanager.cpp
index 5dce9e570..0430aa1ed 100644
--- a/src/citra_qt/bootmanager.cpp
+++ b/src/citra_qt/bootmanager.cpp
@@ -113,10 +113,10 @@ GRenderWindow::GRenderWindow(QWidget* parent) : QWidget(parent), emu_thread(this
113 113
114 // TODO: One of these flags might be interesting: WA_OpaquePaintEvent, WA_NoBackground, WA_DontShowOnScreen, WA_DeleteOnClose 114 // TODO: One of these flags might be interesting: WA_OpaquePaintEvent, WA_NoBackground, WA_DontShowOnScreen, WA_DeleteOnClose
115 QGLFormat fmt; 115 QGLFormat fmt;
116 fmt.setProfile(QGLFormat::CoreProfile);
117 fmt.setVersion(3,2); 116 fmt.setVersion(3,2);
118 fmt.setSampleBuffers(true); 117 fmt.setProfile(QGLFormat::CoreProfile);
119 fmt.setSamples(4); 118 // Requests a forward-compatible context, which is required to get a 3.2+ context on OS X
119 fmt.setOption(QGL::NoDeprecatedFunctions);
120 120
121 child = new GGLWidgetInternal(fmt, this); 121 child = new GGLWidgetInternal(fmt, this);
122 QBoxLayout* layout = new QHBoxLayout(this); 122 QBoxLayout* layout = new QHBoxLayout(this);