From: Brian P. <br...@tu...> - 2002-02-22 23:20:46
|
Sean Ahern wrote: > > One thing that's been really annoying about Chromium and IRIX has been > the use of glXGetProcAddressARB. It doesn't exist on IRIX. > > In hopes of learning more about this issue, I wandered google for a > while. I found the following article very intersting: > http://lists.debian.org/debian-devel/2001/debian- > devel-200107/msg00046.html > > It suggests that if we don't have glXGetProcAddress, we should just > dlopen(NULL, ...) and use the local gl library. The snippet of code > that might replace the call would be: > > #ifndef HAVE_GLXGETPROCADDRESS > #include <dlfcn.h> > void* > glXGetProcAddressARB(char *name) > { > void *dlhand; > > if ((dlhand = dlopen(NULL, RTLD_LAZY))) { > void *handle; > > handle = dlsym(dlhand, name); > dlclose(dlhand); > return handle; > } > return NULL; > } > #endif > > This allows things like "tiletest" to at least link on IRIX. However, I > have almost *zero* knowledge about glXGetProcAddress, so I wanted to see > if someone more knowledgeable than me on this list had any comments > about this. I think the simpler way would be to simply do this: #ifndef HAVE_GLXGETPROCADDRESS /* or may #ifdef IRIX */ void* glXGetProcAddressARB(const char *name) { return crGetProcAddress(name); } #endif However, the crGetProcAddress() function doesn't have entries for all the GLX functions. glXGetProcAddress() is pretty simple, it just returns a pointer to the named GL or GLX function. -Brian |