Stephen J Baker wrote:
> 
> On Thu, 14 Oct 1999, Brett Johnson wrote:
> 
> > I can see both sides of the argument (i.e. glGet... makes for the
> > possibility of fewer #ifdef's, but on the other hand, it breaks the
> > current OpenGL paradigm of gl* calls being noops if a valid context
> > isn't bound).
> 
> You can't query the address of a gl* function unless a context
> is already bound

Given the context-independent definition, this isn't true (or at least
it doesn't have to be true).

> because the meaning of glGetProcAddress is
> **NOT**
> 
>    "Does this function exist? (And what is its address?)"
> 
> It is:
> 
>    "If this function happens to exist, what is its address?"

Actually, I think the meaning is more like:

    "Return the address of a function which, when called, will produce
     identical results to calling the extension function directly."

Since the return value of GetProcAddress is context-independent, there
is no reason to require a currently bound context to call it.  That is
precisely why I favor glXGetProcAddress over glGetProcAddress.

[...]

> We agreed that it would be OK for glGetProcAddress to
> return a non-NULL result for a non-existant (or non-functioning)
> GL call. We should not bypass the existing glGetString
> mechanism.

I didn't suggest bypassing glGetString.  But glGetString should not be
used to determine if it's valid to call GetProcAddress.  It's always
valid to call GetProcAddress.  glGetString need only be used to determine
if it's valid to call the *result* of GetProcAddress.

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