mirror of
https://github.com/mpv-player/mpv
synced 2024-12-24 15:52:25 +00:00
8178b80748
The functions glXGetProcAddressARB() and glXQueryExtensionsString() were loaded using dlsym(). This could fail when compiling to libmpv, because then dlopen(NULL, ...) will look in the main program's list of libraries, and the libGL linked to libmpv is never considered. (Don't know if this somehow could be worked around.) The result is that using vo_opengl with libmpv can fail. Avoid this by not using dlsym(). glXGetProcAddressARB() was already used directly in the same file, and that never caused any problems. (Still add it to the configure test.) glXQueryExtensionsString() is documented as added in GLX 1.1 - that's ancient.
13 lines
254 B
C
13 lines
254 B
C
#include <X11/Xlib.h>
|
|
#include <GL/glx.h>
|
|
#include <GL/gl.h>
|
|
#include <stddef.h>
|
|
|
|
int main(int argc, char *argv[]) {
|
|
glXCreateContext(NULL, NULL, NULL, True);
|
|
glXQueryExtensionsString(NULL, 0);
|
|
glXGetProcAddressARB("");
|
|
glFinish();
|
|
return 0;
|
|
}
|