In your message of 10 September 1999 you write:
> On Fri, Sep 10, 1999 at 02:51:28PM -0600, Thomas Roell wrote:
> > >
> > > 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");
> > }
> >
> >
> > foo_1() can be called regardless of which context is current. foo_2()
> > can only be called with whatever context was current when
> > glGetProcAddressEXT was called. In order to make things work for
> > foo_2() it has to be reformulated in a bizarre way:
> >
> >
> > foo_2()
> > {
> > (*glGetProcAddressEXT("glRectf"))(0.0, 0.0, 1.0, 1.0);
> > }
> >
> >
>
> Is it really that difficult for the programmer to keep track of which
> section of code is in which context? I can see a variable (possibly
> global in scope) that would contain a structure that contains
> information relevant to the current context. The programmer could
> initialize each structure by switching contexts at the start of their
> program to get the function pointers they are looking for. Your
> example above could be changed to read:
First off it is difficult for an application programmer to deal with
any changes they have to make to a Windows/OpenGL version to port it
to Linux. Worse, with adding context-dependant function pointer you
require them to make structural changes.
- Thomas
--
Thomas Roell /\ An imperfect plan executed violently
Xi Graphics / \/\ _ is far superior to a perfect plan.
[EMAIL PROTECTED] / / \ \
/ Oelch! \ \ George Patton