[EMAIL PROTECTED] wrote:
> 
> Briefly:  The dispatch table order is static, and identical for all
> drivers (and the GLX encoder, which counts as a driver as far as this
> feature is concerned).  So there are no ordering conflicts to worry
> about, even in the multiple-server/multiple-client case.

I think it's very much unnecessary to have the table offsets be static,
and I'd rather not go through all the management and administration
hassles that such a static ordering implies.

Having said that though, I'd like to make a proposal if we're going to
force the table offsets to be static, and be assigned by SGI.

I propose that we modify glXGetProcAddress to take an enum/offset as its
argument, rather than a character string.  I.e.:

    void *glXGetProcAddress(GLenum offset);

If we're going to go to all the trouble and overhead of having SGI manage
and assign dispatch table offsets to all possible extensions, let's take
an extra step and also assign enum definitions to those offsets.  Doing
this would allow us to make the GetProcAddress implementation much more
efficient.  Another nice thing about this approach is that it makes it
much more difficult for an application to misspell an extension name and
get a bogus function pointer in return.

So, if the application wants to use a vendor-specific extension, it would
include a vendor-specific header file:

   #include <GL/glHPext.h>

...which would define the appropriate enum(s):

       #define GL_QUANTUM_VERTEX6F_HP_PROC 42

Then the application could simply call:

   qv6f_fptr = (Qv6fFptrType) glXGetProcAddress(GL_QUANTUM_VERTEX6F_HP_PROC);

...to retrieve the appropriate function pointer.

All other offsets (that aren't vendor-specific) could be defined in gl.h.

Cheers!
-- 
Brett Johnson <[EMAIL PROTECTED]>
Workstation Systems Lab
Hewlett-Packard Company

"Politicians, like diapers, should be changed regularly,
 and for the same reason."

Reply via email to