Stephen J Baker wrote:
> On Thu, 16 Sep 1999, Bob Beretta wrote:
>
> > That's a fact. On a Mac, the return values of all glGet* functions may
> > change when the window is moved between screens. If the app cares, it
> > must take steps to find the return values from all drivers associated
> > with that context. We provide a routine to allow the app to
> > explicitely switch between drivers without actually moving the window.
> > Thus, the app can step through all the drivers durings its context
> > initialization and do whatever glGet* operations it must. In the case
> > of extension strings, the app must either take the intersection of the
> > extension strings from all drivers, or be able to switch paths on the
> > fly in response to a driver change.
>
> I strongly object to that behavior since it will cause existing
> (perfectly correct) OpenGL programs to break when the user moves
> the window.
>
> You should either prohibit windows from being moved between drivers
> unless they call some extension function to allow it - or have the
> underlying OpenGL do the ugly business for finding the worst case
> of all glGet operations for programs that don't call an extension
> function to say that they'll take care of it.
>
> I doubt that this implementation of yours could even be counted
> as a legal OpenGL implementation. If glGet says I can have
> such-and-such number of lights/clip-planes/whatever then I
> can certainly have that number for the life of the program
> (the spec doesn't say otherwise)...if the user goes and
> drags my window off onto another screen and that number
> gets smaller, OpenGL broke it's promise to me - and that's
> an invalid implementation.
>
> Yuk! Tell me it ain't so!
The behavior I describe applies only to GL contexts where the application
has requested that the context be created to support multiple graphics
devices. Of course, the app may specify a single device at context creation,
in which case it will get the enviable Windoze standard functionality - a blank
window when the user drags the window to another monitor. It's a perfectly
legal implementation because it's optional functionality - an app is free to
create a new context or do other bookkeeping when the window wants to
change drivers. The creation of contexts is AGL functionality (Apple's
version of glX or wgl) - outside the scope of the GL spec.
Now, back to the real world. It works great. Every shipping (windowing)
OpenGL app on the Mac uses it and all our developers love it. Hundreds of
GLUT apps work flawlessly as they are moved between accelerated monitors
with different accelerator cards from different vendors. If you wish to shake
your finger at us, thereby leaving Apple with the only app-almost-transparent,
multi-headed, heterogeneous OpenGL implementation in the commercial
market - excellent! But, as a Linux enthusiast, I hope Linux will follow suit,
and maybe do it better.
Bob Beretta
Apple Computer