On Thu, 14 Oct 1999, Brett Johnson wrote:
> > On the flip side, does it make sense to even call GetProcAddress before you
> > have queried the existance of an extension? I think not.
>
> I can think of at least one instance where it makes sense:
>
> - You're writing a library. At initialization, you want to gather all of
> the function pointers you might call later (depending on whether the
> associated extension is supported).
But you can't use those pointers until you have queried to make sure
that they are functional within some particular context. Since you
have to go and 'validate' each one against glGetString(GL_EXTENSIONS)
AFTER the context is bound, you might as well go and fetch your pointers at
that point in time and save asking about all those extensions that your
hardware has never even heard about. That's why I don't particularly
care if I need a valid context for glGetProcAddress - because in
any practical application, I need that context anyway.
With this mechanism, it's probably no biggie whether the pointers are
context-dependent or context-independent. The library needs to be
told which context it is bound to in order that it can use the
right set of extensions for the current context - that's a pain
but it's inevitable if you allow heterogeneous renderers.
I'm actually still somewhat on the context-independent side of the
fence right now - but I don't see that context-dependancy really
makes matters worse for sophisticated programs. My plea for
context-independance (if it doesn't cost much to implement) is
only that it makes things a lot easier for real simple programs
and will cut down the number of dumb questions we see
on c.g.a.o
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