[SDL] linux opengl extension

Sam Lantinga slouken at devolution.com
Sun Jan 5 13:25:01 PST 2003


> from an email from a nvidia developer
> ------------------------
> One of our developers changed the behavior of the driver to avoid the
> dynamic symbol resolution we are currently doing, but found that it didn't
> actually fix your test.

> What he found was that libsdl doesn't actually use the
> GLX_ARB_get_proc_address extension.  Instead, it simply calls dlsym().
> First it tries "glFunctionARB"; then it tries "_glFunctionARB" if it fails.
> I don't know how Linux symbol naming works, but there seems to be something
> weird going on.  dlsym has a flag RTLD_GLOBAL that makes symbols "global" so
> they are returned even if they aren't in the named executable -- not sure if
> symbols in your main executable would be global or not.  If they are,
> perhaps they will be returned by any dlsym() call?  In any event, there may
> be multiple symbols of any given name here.
> ------------------------

> hes refering to this

> void *X11_GL_GetProcAddress(_THIS, const char* proc)
> {
>          static char procname[1024];
>          void* handle;
>          void* retval;

>          handle = this->gl_config.dll_handle;
> #if 0 /* This doesn't work correctly yet */
>          if ( this->gl_data->glXGetProcAddress ) {
> ...
> ...

> also so why isnt this workinh yet #if 0 /* This doesn't work correctly 
> yet */

Thanks for the info.  The old Mesa Voodoo drivers would actually crash if
you called glxGetProcAddress on some extensions.  It's probably save to enable
that code now, so try it and see if that fixes your problem.

See ya!
	-Sam Lantinga, Software Engineer, Blizzard Entertainment




More information about the SDL mailing list