From c05f66bdd08ce73b55252572e1d9adbf4daa886a Mon Sep 17 00:00:00 2001 From: degasus Date: Thu, 31 Jan 2013 12:20:17 +0100 Subject: [PATCH] first try for osx core profile now it doesn't crash, but it still hangs on startup --- Source/Core/DolphinWX/Src/GLInterface/AGL.cpp | 2 +- Source/Plugins/Plugin_VideoOGL/Src/Render.cpp | 3 +++ Source/Plugins/Plugin_VideoSoftware/Src/SWmain.cpp | 5 ++++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Source/Core/DolphinWX/Src/GLInterface/AGL.cpp b/Source/Core/DolphinWX/Src/GLInterface/AGL.cpp index cf68c0baa4..e12e061aa6 100644 --- a/Source/Core/DolphinWX/Src/GLInterface/AGL.cpp +++ b/Source/Core/DolphinWX/Src/GLInterface/AGL.cpp @@ -57,7 +57,7 @@ bool cInterfaceAGL::Create(void *&window_handle) } GLWin.cocoaCtx = [[NSOpenGLContext alloc] - initWithFormat: fmt shareContext: nil]; + initWithFormat: fmt shareContext: nil kCGLPFAOpenGLProfile: kCGLOGLPVersion_3_2_Core ]; [fmt release]; if (GLWin.cocoaCtx == nil) { ERROR_LOG(VIDEO, "failed to create context"); diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp index 2ac7beb28f..bc29e12a38 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp @@ -257,6 +257,9 @@ Renderer::Renderer() } // Init extension support. +#ifdef __APPLE__ + glewExperimental = 1; +#endif if (glewInit() != GLEW_OK) { ERROR_LOG(VIDEO, "glewInit() failed! Does your video card support OpenGL 2.x?"); diff --git a/Source/Plugins/Plugin_VideoSoftware/Src/SWmain.cpp b/Source/Plugins/Plugin_VideoSoftware/Src/SWmain.cpp index 4c88a89ab6..8a6d2d5426 100644 --- a/Source/Plugins/Plugin_VideoSoftware/Src/SWmain.cpp +++ b/Source/Plugins/Plugin_VideoSoftware/Src/SWmain.cpp @@ -141,9 +141,12 @@ void VideoSoftware::Shutdown() void VideoSoftware::Video_Prepare() { GLInterface->MakeCurrent(); - // Init extension support. + // Init extension support. { #ifndef USE_GLES +#ifdef __APPLE__ + glewExperimental = 1; +#endif if (glewInit() != GLEW_OK) { ERROR_LOG(VIDEO, "glewInit() failed!Does your video card support OpenGL 2.x?"); return;