mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 18:15:10 +00:00
parent
5c8121e7a8
commit
d7882cb89b
@ -166,23 +166,7 @@ static GLXContext createLegacyContext(_GLFWwindow* window,
|
|||||||
int _glfwInitContextAPI(void)
|
int _glfwInitContextAPI(void)
|
||||||
{
|
{
|
||||||
#ifdef _GLFW_DLOPEN_LIBGL
|
#ifdef _GLFW_DLOPEN_LIBGL
|
||||||
int i;
|
_glfw.glx.libGL = dlopen("libGL.so.1", RTLD_LAZY | RTLD_GLOBAL);
|
||||||
char* libGL_names[ ] =
|
|
||||||
{
|
|
||||||
"libGL.so",
|
|
||||||
"libGL.so.1",
|
|
||||||
"/usr/lib/libGL.so",
|
|
||||||
"/usr/lib/libGL.so.1",
|
|
||||||
NULL
|
|
||||||
};
|
|
||||||
|
|
||||||
for (i = 0; libGL_names[i] != NULL; i++)
|
|
||||||
{
|
|
||||||
_glfw.glx.libGL = dlopen(libGL_names[i], RTLD_LAZY | RTLD_GLOBAL);
|
|
||||||
if (_glfw.glx.libGL)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!_glfw.glx.libGL)
|
if (!_glfw.glx.libGL)
|
||||||
{
|
{
|
||||||
_glfwInputError(GLFW_PLATFORM_ERROR, "GLX: Failed to find libGL");
|
_glfwInputError(GLFW_PLATFORM_ERROR, "GLX: Failed to find libGL");
|
||||||
|
Loading…
Reference in New Issue
Block a user