mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 04:54:35 +00:00
GLX: Add support for loading glvnd libGLX
(cherry picked from commit c18851f52e
)
This commit is contained in:
parent
ed55529ce8
commit
1f675ab62f
@ -126,6 +126,7 @@ information on what to include when reporting a bug.
|
|||||||
- [Wayland] Bugfix: Connecting a mouse after `glfwInit` would segfault (#1450)
|
- [Wayland] Bugfix: Connecting a mouse after `glfwInit` would segfault (#1450)
|
||||||
- [Linux] Bugfix: Joysticks without buttons were ignored (#2042,#2043)
|
- [Linux] Bugfix: Joysticks without buttons were ignored (#2042,#2043)
|
||||||
[EGL] Added loading of glvnd `libOpenGL.so.0` where available for OpenGL
|
[EGL] Added loading of glvnd `libOpenGL.so.0` where available for OpenGL
|
||||||
|
- [GLX] Added loading of glvnd `libGLX.so.0` where available
|
||||||
|
|
||||||
|
|
||||||
## Contact
|
## Contact
|
||||||
|
@ -226,7 +226,10 @@ static GLFWglproc getProcAddressGLX(const char* procname)
|
|||||||
else if (_glfw.glx.GetProcAddressARB)
|
else if (_glfw.glx.GetProcAddressARB)
|
||||||
return _glfw.glx.GetProcAddressARB((const GLubyte*) procname);
|
return _glfw.glx.GetProcAddressARB((const GLubyte*) procname);
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
// NOTE: glvnd provides GLX 1.4, so this can only happen with libGL
|
||||||
return _glfw_dlsym(_glfw.glx.handle, procname);
|
return _glfw_dlsym(_glfw.glx.handle, procname);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void destroyContextGLX(_GLFWwindow* window)
|
static void destroyContextGLX(_GLFWwindow* window)
|
||||||
@ -263,6 +266,7 @@ GLFWbool _glfwInitGLX(void)
|
|||||||
#elif defined(__OpenBSD__) || defined(__NetBSD__)
|
#elif defined(__OpenBSD__) || defined(__NetBSD__)
|
||||||
"libGL.so",
|
"libGL.so",
|
||||||
#else
|
#else
|
||||||
|
"libGLX.so.0",
|
||||||
"libGL.so.1",
|
"libGL.so.1",
|
||||||
"libGL.so",
|
"libGL.so",
|
||||||
#endif
|
#endif
|
||||||
|
@ -127,7 +127,6 @@ typedef struct _GLFWlibraryGLX
|
|||||||
int eventBase;
|
int eventBase;
|
||||||
int errorBase;
|
int errorBase;
|
||||||
|
|
||||||
// dlopen handle for libGL.so.1
|
|
||||||
void* handle;
|
void* handle;
|
||||||
|
|
||||||
// GLX 1.3 functions
|
// GLX 1.3 functions
|
||||||
|
Loading…
Reference in New Issue
Block a user