On Wed, 8 Sep 1999, Brian Paul wrote:
> I'd like to implement the proposed glGetProcAddressEXT() function
> in Mesa 3.1 ASAP. Since I hadn't seen a specification for this
> extension yet I decided to write a draft for it. It's attached
> below. Please review and send comments. Especially take note of
> the Issues section.
| Overview
|
| This extension adds a function (GetProcAddressEXT) which returns
| the address of extension functions...
...and regular OpenGL functions. I'd like to write OpenGL
programs that will run on OpenGL 1.1 - but still make use of
OpenGL 1.2 (and ultimately 1.3, ...) functions if they happen
to be available. This is routinely done in the Windoze world
because the M$ .DLL doesn't export the 1.2 function names from
the underlying ICD - so you have to use wglGetFuncAddress.
I believe we'd make code portability from Windoze much easier
if we made glGetFuncAddress work on the core OpenGL functions
too.
| * Is this extension properly named?
I think the ARB should bless this with an ARB suffix - but that
probably can't happen as fast as we'd like.
| * Should GetProcAddressEXT allow querying of itself?
Yes - although it's pointless, it's better to allow it than
to complicate the spec by explicitly excluding it.
| * There's a recursion problem with this feature. The purpose of
| GetProcAddressEXT is to return pointers to extension functions
| and GetProcAddressEXT is itself such a function! This presents
| a puzzle to the application developer.
Not really. If glGetProcAddressEXT isn't available at compile
time - then this isn't a linux-opengl-base compliant machine and
it can't be expected to generate binaries for linux-opengl-base
compliant targets. If glGetProcAddressEXT isn't available at
run time - then this isn't a linux-opengl-base compliant machine
and it can't be expected to run binaries that have that compliance
as a requirement.
IMHO, one should check for the existance of this extension
both at compile time and at run time (although your program
probably won't even start up if it's compiled in but
doesn't exist in the library).
| 6.1.13 Obtaining Extension Function Pointers
|
| The GL extensions which are available to a client application can
| only be determined at runtime. Therefore, the address of extension
| functions should be queried at runtime.
|
| The function
| void *GetProcAddressEXT(const ubyte *procName);
| returns the address of the extension function named by procName.
| NULL is returned if the named function is not available.
As I explained before, ALL OpenGL core functions (not GLU or GLX)
as well as all extensions.
| Functions which are extensions to the GL window system interface
| (such as GLX and WGL) are also obtainable with GetProcAddressEXT.
I disagree - the gl function set shouldn't know about glX functions.
I think (on reflection) that there needs to be both glxGetFuncAddressEXT
and gluGetFuncAddressEXT in addition to glGetFuncAddressEXT.
(or preferably, glxGetFuncAddressARB and gluGetFuncAddressARB if
glGetFuncAddressARB can be made to happen)
This would fit "naturally" with wglGetFuncAddress
under the "other" OS and make it look like we'd thought
about that from day #1.
| INVALID_OPERATION is generated if GetProcAddressEXT is called
| between Begin and End.
Yikes! I certainly hope so!!
Steve Baker (817)619-2657 (Vox/Vox-Mail)
Raytheon Systems Inc. (817)619-2466 (Fax)
Work: [EMAIL PROTECTED] http://www.hti.com
Home: [EMAIL PROTECTED] http://web2.airmail.net/sjbaker1