Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!uunet!rosie!pgraff From: pgraff@next.com (Peter Graffagnino) Newsgroups: comp.sys.next Subject: Re: bits per pixel (was: NeXT General Educational Disqucount?) Message-ID: <723@rosie.NeXT.COM> Date: 14 May 91 01:33:38 GMT References: <1991May12.205753.23335@neon.Stanford.EDU> <721@rosie.NeXT.COM> Sender: news@NeXT.COM Organization: Next Computer, Inc. Lines: 49 Nntp-Posting-Host: graff.next.com In article <721@rosie.NeXT.COM> king (Peter King) writes: ...... >backing store for your window will double in size to accomodate the alpha >channel. > >Note that the alpha values for the color window depths exactly match the amount >of padding used for halfword|word alignment. The Window Server will always >allocate 16|32 bits per pixel for the color depths. With color windows, you >always get your alpha channel whether you use it or not. Since the display >hardware doesn't touch the alpha channel, it is safely preserved in VRAM as >well as backing store. This is great for Retained windows! > >Peter > > >----------Disclaimers? No such thing. Everything's the truth---------- >Peter F. King Developer Trainer NeXT Computer, Inc. >USPS: 900 Chesapeake Dr. Redwood City, CA 94063 >Internet: Peter_King@NeXT.COM Peter is nearly correct. On NeXTstation Color we actually only use 12 bits per pixel of VRAM for the display. From the CPU, the framebuffer looks like an array of 16 bit pixels with the low nibble of each pixel tied high. On NeXTdimension, we have the full 32bits per pixel of VRAM. In this case the low-order byte is used for storing pixel `tags' for the RAMDAC. This allows us to support 12bit double buffered pixels as well as 24 bit single-buffered pixels. (our current software does not take advantage of this feature, however). In no current NeXT framebuffer implementations is alpha ever stored in VRAM arrays. As far as Retained windows go, the WindowServer actually notices when a window acquires alpha by monitoring the drawing commands issued to it. If a Retained window has never had alpha drawn into it (and the backing store's depth matches that of the VRAM), drawing will occur directly into VRAM. Otherwise, Retained window drawing will actually occur into the backing store first (in order to capture the alpha data), followed by an implicit flush to the screen. This is one of the reasons why it is important not to use alpha in on-screen windows (the extra flush is expensive). Typically, windows with alpha are used for off-screen drawing caches (such as those managed by the appkit's NXImage object) which are then Sover'ed onto an onscreen window for presentation to the user. Peter Graffagnino Graphics Software NeXT Computer, Inc.