mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-29 20:20:43 +00:00
don't use glXGetProcAddressARB to look up the glX functions. hopefully fixes
the nvidea segfault
This commit is contained in:
parent
8ebef28b7a
commit
aa5ad0f0f9
1 changed files with 5 additions and 1 deletions
|
@ -90,6 +90,8 @@ Bool (* qfglXMakeCurrent) (Display *dpy, GLXDrawable drawable, GLXContext ctx);
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|
||||||
|
static int use_gl_procaddress;
|
||||||
|
|
||||||
#if defined(HAVE_DLOPEN)
|
#if defined(HAVE_DLOPEN)
|
||||||
|
|
||||||
void * (* glGetProcAddress) (const char *symbol) = NULL;
|
void * (* glGetProcAddress) (const char *symbol) = NULL;
|
||||||
|
@ -99,7 +101,7 @@ QFGL_GetProcAddress (void *handle, const char *name)
|
||||||
{
|
{
|
||||||
void *glfunc = NULL;
|
void *glfunc = NULL;
|
||||||
|
|
||||||
if (glGetProcAddress)
|
if (use_gl_procaddress && glGetProcAddress)
|
||||||
glfunc = glGetProcAddress (name);
|
glfunc = glGetProcAddress (name);
|
||||||
if (!glfunc)
|
if (!glfunc)
|
||||||
glfunc = dlsym (handle, name);
|
glfunc = dlsym (handle, name);
|
||||||
|
@ -191,6 +193,8 @@ VID_Init (unsigned char *palette)
|
||||||
true);
|
true);
|
||||||
qfglXMakeCurrent = QFGL_ProcAddress (libgl_handle, "glXMakeCurrent", true);
|
qfglXMakeCurrent = QFGL_ProcAddress (libgl_handle, "glXMakeCurrent", true);
|
||||||
|
|
||||||
|
use_gl_procaddress = 1;
|
||||||
|
|
||||||
Cmd_AddCommand ("vid_center", VID_Center_f, "Center the view port on the "
|
Cmd_AddCommand ("vid_center", VID_Center_f, "Center the view port on the "
|
||||||
"quake window in a virtual desktop.\n");
|
"quake window in a virtual desktop.\n");
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue