In your message of 11 September 1999 you write:

> Thomas Roell writes:
> 
>  > foo_2() {
>  >    (*rect)(0.0, 0.0, 1.0, 1.0);
>  > }
> 
> If you just change rect every time you change the current
> context, you should be fine? Context switching is expensive,
> so assigning cached pointers from a per-context LUT to the
> global variable (better than (*(current->rect))) should
> be doable?

The problem with that is that it leads to a lot of bugs. What happens
if you have two graphics boards in your system (A and B). You set up
"rect" pointing to A, but execute the function with a context owned by
board B. If the dispatching is done behind the scenes this is a
non-issue. If it's in the hands of an application writer, it is a big
problem.

- Thomas
-- 
             Thomas Roell   /\         An imperfect plan executed violently
             Xi Graphics   /  \/\ _     is far superior to a perfect plan. 
         [EMAIL PROTECTED]   /   /  \ \     
                         / Oelch! \ \             George Patton

Reply via email to