Преглед изворни кода

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.
Yuri Kunde Schlesner пре 12 година
родитељ
комит
ac54cd13db
2 измењених фајлова са 3 додато и 6 уклоњено
  1. 0 3
      src/citra/emu_window/emu_window_glfw.cpp
  2. 3 3
      src/citra_qt/bootmanager.cpp

+ 0 - 3
src/citra/emu_window/emu_window_glfw.cpp

@@ -42,12 +42,9 @@ EmuWindow_GLFW::EmuWindow_GLFW() {
     }
     glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
     glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 2);
-	
-#if EMU_PLATFORM == PLATFORM_MACOSX
     // GLFW on OSX requires these window hints to be set to create a 3.2+ GL context.
     glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
     glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
-#endif
 	
     m_render_window = glfwCreateWindow(VideoCore::kScreenTopWidth, 
         (VideoCore::kScreenTopHeight + VideoCore::kScreenBottomHeight), 

+ 3 - 3
src/citra_qt/bootmanager.cpp

@@ -113,10 +113,10 @@ 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
     QGLFormat fmt;
-    fmt.setProfile(QGLFormat::CoreProfile);
     fmt.setVersion(3,2);
-    fmt.setSampleBuffers(true);
-    fmt.setSamples(4);
+    fmt.setProfile(QGLFormat::CoreProfile);
+    // Requests a forward-compatible context, which is required to get a 3.2+ context on OS X
+    fmt.setOption(QGL::NoDeprecatedFunctions);
     
     child = new GGLWidgetInternal(fmt, this);
     QBoxLayout* layout = new QHBoxLayout(this);