From c976e14277aa70eaeb4fe6115137645a2a77b507 Mon Sep 17 00:00:00 2001 From: degasus Date: Thu, 17 Sep 2015 17:48:25 +0200 Subject: GLInterface: Fix VideoSW on linux + OSX (v2) Our Video Software backend isn't OpenGL Core compatible, so we need a flag to alloc a compatible one. v2: Fix AGL profile selection. --- Source/Core/VideoBackends/OGL/GLInterface/AGL.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source/Core/VideoBackends/OGL/GLInterface/AGL.cpp') diff --git a/Source/Core/VideoBackends/OGL/GLInterface/AGL.cpp b/Source/Core/VideoBackends/OGL/GLInterface/AGL.cpp index 924fdea821..62286cb956 100644 --- a/Source/Core/VideoBackends/OGL/GLInterface/AGL.cpp +++ b/Source/Core/VideoBackends/OGL/GLInterface/AGL.cpp @@ -15,7 +15,7 @@ void cInterfaceAGL::Swap() // Create rendering window. // Call browser: Core.cpp:EmuThread() > main.cpp:Video_Initialize() -bool cInterfaceAGL::Create(void *window_handle) +bool cInterfaceAGL::Create(void *window_handle, bool core) { cocoaWin = reinterpret_cast(window_handle); NSSize size = [cocoaWin frame].size; @@ -33,7 +33,7 @@ bool cInterfaceAGL::Create(void *window_handle) s_backbuffer_width = size.width; s_backbuffer_height = size.height; - NSOpenGLPixelFormatAttribute attr[] = { NSOpenGLPFADoubleBuffer, NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersion3_2Core, NSOpenGLPFAAccelerated, 0 }; + NSOpenGLPixelFormatAttribute attr[] = { NSOpenGLPFADoubleBuffer, NSOpenGLPFAOpenGLProfile, core ? NSOpenGLProfileVersion3_2Core : NSOpenGLProfileVersionLegacy, NSOpenGLPFAAccelerated, 0 }; NSOpenGLPixelFormat *fmt = [[NSOpenGLPixelFormat alloc] initWithAttributes: attr]; if (fmt == nil) -- cgit v1.2.3