On Thu, 14 Oct 1999, Brett Johnson wrote:

> 
> Brian Paul wrote:
> >
> > I believe the only outstanding issue is whether glGetProcAddressEXT
> > is indeed the right function name.  The alternative is to use
> > glXGetProcAddressEXT to return pointers to core GL functions in
> > addition to GLX functions.
> > 
> > I'm in favor of the former (having glGetProcAddressEXT).
> 
> Could you give some rationale for why you favor this Brian?
> 
> 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 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?"

Hence, it's meaningless to make a glGetProcAddress call
until you know that the function you are querying exists
and is supported by at least one of the contexts you are
rendering to.

How do you find that out?

Well, you call glGetString(GL_EXTENSIONS) -- and you can't
do *THAT* until you have a valid context.

Hence, you always have a valid context by the time you can
make a legal call to glGetProcAddress - even though the
result of that call is context-independent.

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.


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

Reply via email to