Ian Romanick wrote:
I'm still after the SDL/glX/whatever bug with glXGetProcAddressARB, and I read the extension specification at http://oss.sgi.com/projects/ogl-sample/registry/ARB/get_proc_address.txt . Here is an excerpt :
Here's the deal. glXGetProcAddress *NEVER* returns NULL. It returns a pointer to a dispatch function. If you request an unknown function, it will dynamically generate a dispatch for it. Try calling 'glXGetProcAddressARB((const GLubyte*)"glThisFunctionDoesntExist");". Getting a pointer back isn't enough. You have to look at the extension string to be sure the extension is supported. If I'm not mistaken, the GLX spec says that calling a function for an unsupported extension give "undefined" behavior.
There is no way, without great pain (I'm not even sure then), that we could prevent the segfault. Using the pointer without checking for the extension is right up there with not checking the return from malloc.
<<
* Should the query return NULL for entry points not supported
by the implementation, or a pointer to a function which
generates an error?
NULL. There is no consistent way to generate errors when either GL or GLX functions may be queried. >>
Do I misunderstand something, or does the spec for glXGetProcAddressARB says the opposite ?
Stephane
------------------------------------------------------- This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504 -- _______________________________________________ Dri-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dri-devel
