GLInterface: Fix VideoSW on linux + OSX

Our Video Software backend isn't OpenGL Core compatible, so we need a flag to alloc a compatible one.
This commit is contained in:
degasus
2015-09-17 17:48:25 +02:00
parent 52de4cc476
commit 48279c1840
10 changed files with 18 additions and 14 deletions

View File

@ -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[] =
{