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/GLX.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'Source/Core/VideoBackends/OGL/GLInterface/GLX.cpp') diff --git a/Source/Core/VideoBackends/OGL/GLInterface/GLX.cpp b/Source/Core/VideoBackends/OGL/GLInterface/GLX.cpp index cd8cc5f070..2d22ab7101 100644 --- a/Source/Core/VideoBackends/OGL/GLInterface/GLX.cpp +++ b/Source/Core/VideoBackends/OGL/GLInterface/GLX.cpp @@ -44,7 +44,7 @@ void cInterfaceGLX::Swap() // Create rendering window. // Call browser: Core.cpp:EmuThread() > main.cpp:Video_Initialize() -bool cInterfaceGLX::Create(void *window_handle) +bool cInterfaceGLX::Create(void *window_handle, bool core) { dpy = XOpenDisplay(nullptr); int screen = DefaultScreen(dpy); @@ -107,9 +107,13 @@ bool cInterfaceGLX::Create(void *window_handle) GLX_CONTEXT_FLAGS_ARB, GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB, None }; - ctx = glXCreateContextAttribs(dpy, fbconfig, 0, True, context_attribs); - XSync(dpy, False); - if (!ctx || s_glxError) + ctx = nullptr; + if (core) + { + ctx = glXCreateContextAttribs(dpy, fbconfig, 0, True, context_attribs); + XSync(dpy, False); + } + if (core && (!ctx || s_glxError)) { int context_attribs_33[] = { -- cgit v1.2.3