On Fri, 10 Sep 1999, Thomas Roell wrote:
> > We are not demanding to have:
> >
> > glGetError ( context, ... ) ;
> > glAreTexturesResident ( context, ... ) ;
> >
> > ...etc?
> >
> > Is this really all that different?
>
> Yes, it is different. Look at the two functions below:
>
> void (*rect)();
>
> foo_1()
> {
> glRectf(0.0, 0.0, 1.0, 1.0);
> }
>
> foo_2()
> {
> (*rect)(0.0, 0.0, 1.0, 1.0);
> }
>
> main()
> {
> rect = glGetProcAddressEXT("glRectf");
> }
Yes - of course. I understand.
So without a context argument:
main()
{
for ( i = 0 ; i < num_contexts ; i++ )
{
SelectContext ( i ) ;
rect = glGetProcAddressEXT("glRectf");
}
}
foo_2 ( int context )
{
(*(rect[context]))(0,0,1,1);
}
...or something like that.
But even *with* a context argument to glGetProcAddress, foo_2 still
has to be as I show above...because glrectf has a different address
for each context (well, no - that's silly - but not so silly for
an extension perhaps).
OH!!! So you are saying that the same returned address should
work for *every* context...but the problem being that you
may be handed the address of a function that's valid in one
context but not in another.
OK - now I understand the problem.
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