glXGetFBConfigs() return value
Ian Romanick
idr at us.ibm.com
Sun Jul 15 21:10:33 PDT 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Tomas Carnecky wrote:
> It returns 'GLXFBConfig *', but 'GLXFBConfig' is typedef'd to a pointer
> to __GLXFBConfigRec, so glXGetFBConfigs() returns a list of pointers to
> __GLXFBConfigRec. But, with my binary nvidia driver, the list doesn't
> contain actual pointers, but GLXFBConfigID's (0xa1 isn't a valid
> pointer, and I have a visual with GLX_FBCONFIG_ID=0xa1).
> Now if I get the list from glXGetFBConfigs(), am I allowed to make a
> local copy of a GLXFBConfig and keep it even after I XFree() the list? A
> small piece of code will explain better what I want to do:
>
> GLXFBConfig *list = glXGetFBConfigs(...);
> GLXFBConfig copy = list[0];
> XFree(list);
> glXGetFBConfigAttrib(.., copy, ..);
Yeah, this code should be fine.
> Will that work on all drivers, and not just the binary nvidia?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
iD8DBQFGmu+5X1gOwKyEAw8RAgXVAJwLyrUs2KKksVADL0TW47Hel3QfNwCdEfOr
MN1pso++akFIo+da00A+JAo=
=NOzs
-----END PGP SIGNATURE-----
More information about the xorg
mailing list