740acac7a4
Isaac: Rebirth" and "Crypt of the NecroDancer" from Steam not working
79 lines
2.8 KiB
Diff
79 lines
2.8 KiB
Diff
From caa4eb0c34b19b694a8fe886411e012d3beb6b36 Mon Sep 17 00:00:00 2001
|
|
From: Hans de Goede <hdegoede@redhat.com>
|
|
Date: Thu, 2 Feb 2017 13:34:29 +0100
|
|
Subject: [PATCH 7/7] GLX: Add GLX_SGIX_fbconfig functions
|
|
|
|
Some older apps, e.g. games using version 3.0 or older of the glfw library
|
|
try to use the old GLX_SGIX_fbconfig extension functions if present instead
|
|
of the regular glXGetFBConfigs, glXGetFBConfigAttrib and glXCreateNewContext
|
|
functions.
|
|
|
|
This commit adds implementations of these to libglvnd's libGLX fixing e.g.
|
|
the "The Binding if Isaac: Rebirth" and "Crypt of the NecroDancer" games from
|
|
Steam failing with a "GLX: Failed to retrieve visual for GLXFBConfig" error.
|
|
|
|
Note this commit does not add implementations for
|
|
glXCreateGLXPixmapWithConfigSGIX and glXGetFBConfigFromVisualSGIX as these
|
|
cannot be simply mapped to non extension functions and in practice these
|
|
do not seem to be used.
|
|
|
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
---
|
|
src/GLX/libglx.c | 33 +++++++++++++++++++++++++++++++++
|
|
1 file changed, 33 insertions(+)
|
|
|
|
diff --git a/src/GLX/libglx.c b/src/GLX/libglx.c
|
|
index a2a9502..13434c0 100644
|
|
--- a/src/GLX/libglx.c
|
|
+++ b/src/GLX/libglx.c
|
|
@@ -1579,6 +1579,33 @@ PUBLIC GLXFBConfig *glXGetFBConfigs(Display *dpy, int screen, int *nelements)
|
|
}
|
|
|
|
|
|
+PUBLIC int glXGetFBConfigAttribSGIX(Display *dpy, GLXFBConfigSGIX config,
|
|
+ int attribute, int *value)
|
|
+{
|
|
+ return glXGetFBConfigAttrib(dpy, (GLXFBConfig)config, attribute, value);
|
|
+}
|
|
+
|
|
+PUBLIC GLXFBConfigSGIX *glXChooseFBConfigSGIX(Display *dpy, int screen,
|
|
+ const int *attrib_list, int *nelements)
|
|
+{
|
|
+ return glXChooseFBConfig(dpy, screen, attrib_list, nelements);
|
|
+}
|
|
+
|
|
+PUBLIC GLXContext glXCreateContextWithConfigSGIX (Display *dpy,
|
|
+ GLXFBConfigSGIX config, int render_type,
|
|
+ GLXContext share_list, Bool direct)
|
|
+{
|
|
+ return glXCreateNewContext(dpy, (GLXFBConfig)config, render_type,
|
|
+ share_list, direct);
|
|
+}
|
|
+
|
|
+PUBLIC XVisualInfo *
|
|
+glXGetVisualFromFBConfigSGIX(Display *dpy, GLXFBConfigSGIX config)
|
|
+{
|
|
+ return glXGetVisualFromFBConfig(dpy, (GLXFBConfig)config);
|
|
+}
|
|
+
|
|
+
|
|
PUBLIC void glXGetSelectedEvent(Display *dpy, GLXDrawable draw,
|
|
unsigned long *event_mask)
|
|
{
|
|
@@ -1680,6 +1707,12 @@ const __GLXlocalDispatchFunction LOCAL_GLX_DISPATCH_FUNCTIONS[] =
|
|
|
|
LOCAL_FUNC_TABLE_ENTRY(glXImportContextEXT)
|
|
LOCAL_FUNC_TABLE_ENTRY(glXFreeContextEXT)
|
|
+
|
|
+ LOCAL_FUNC_TABLE_ENTRY(glXGetFBConfigAttribSGIX)
|
|
+ LOCAL_FUNC_TABLE_ENTRY(glXChooseFBConfigSGIX)
|
|
+ LOCAL_FUNC_TABLE_ENTRY(glXCreateContextWithConfigSGIX)
|
|
+ LOCAL_FUNC_TABLE_ENTRY(glXGetVisualFromFBConfigSGIX)
|
|
+
|
|
#undef LOCAL_FUNC_TABLE_ENTRY
|
|
{ NULL, NULL }
|
|
};
|
|
--
|
|
2.9.3
|
|
|