Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Java Swing and Quartz



Brian Foster wrote:

>Basically there is no purpose to the assignment, except just to see the
>difference between having double buffering on and having it off. I imagine
>I could just run the program on Windows. However it would be nice to know
>if there was a way to turn the default double buffer off, so that way the
>Java Swing one would turn on.

Double-buffering is inherent to the Quartz windowing model.  You can't turn
it off.  Ever.  AFAIK.

It has to be that way because that's the only way to get window
translucency or cast translucent shadows.  If you could just "turn it off",
then the windowing subsystem wouldn't know what the content of the "behind"
windows was, so it would be impossible to do the blending needed to render
translucency in the screen's frame-buffer.

Swing's double-buffering is done for a different reason, and it doesn't
take translucency into account at all.  That is, when the contents of a
Swing double-buffer is blitted to the screen, it assumes the content is
opaque.  Or more specifically, it doesn't account for the possibility of it
being non-opaque.  There are Java2D elements that model and render
translucency, but they are rendered "pre-blended" to the Swing
double-buffer when that's enabled.

Inherent double-buffering is needed by any drawing model that allows
translucency in a frame-buffer.  It comes down to one thing: in order to
see "through a glass darkly", or through a translucent foreground object to
an element farther back, you have to be able to render the pixels of
everything behind that foreground object.  In short, translucence changes
everything.


>This has basically just turned into a search as to whether such a thing
>can be done.

AFAIK, the answer is "can't be done" on Mac OS X.

  -- GG


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.