diff options
| author | degasus <wickmarkus@web.de> | 2015-09-17 17:48:25 +0200 |
|---|---|---|
| committer | degasus <wickmarkus@web.de> | 2015-09-19 13:22:55 +0200 |
| commit | c976e14277aa70eaeb4fe6115137645a2a77b507 (patch) | |
| tree | f468c9b1a058146fec28e14eef5f2f89017af865 /Source/Core/VideoBackends/OGL/GLInterface/GLX.cpp | |
| parent | 9b08de95224c817815c0705f8531cf007553b57e (diff) | |
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.
Diffstat (limited to 'Source/Core/VideoBackends/OGL/GLInterface/GLX.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/OGL/GLInterface/GLX.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
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[] = { |
