[patch] Use dlsym instead of glXGetProcAddress in xdriinfo
Ian Romanick
idr at us.ibm.com
Wed Nov 23 07:27:36 PST 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Eric Anholt wrote:
> @@ -57,8 +58,8 @@
> char *funcArg = NULL;
> char *dpyName = NULL;
>
> - GetScreenDriver = (glXGetScreenDriver_t *)glXGetProcAddress ("glXGetScreenDriver");
> - GetDriverConfig = (glXGetDriverConfig_t *)glXGetProcAddress ("glXGetDriverConfig");
> + GetScreenDriver = (glXGetScreenDriver_t *)glXGetProcAddressARB ("glXGetScreenDriver");
> + GetDriverConfig = (glXGetDriverConfig_t *)glXGetProcAddressARB ("glXGetDriverConfig");
> if (!GetScreenDriver || !GetDriverConfig) {
> fprintf (stderr, "libGL is too old.\n");
> return 1;
Actually, this code is totally bogus. In X.org's default libGL,
glXGetProcAddress *NEVER* returns NULL. Ever. Replace
"glXGetScreenDriver" above with "glXLikesToSegfault" and you'll see what
I mean. :)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
iD8DBQFDhIpoX1gOwKyEAw8RAkTZAJ9El6nwO6CiZkpif6aQgobWa80MogCaA1p+
Vpn7GqmYivT9C4S9Ix6mI/0=
=e4Ic
-----END PGP SIGNATURE-----
More information about the xorg
mailing list