Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!rosie!king From: king (Peter King) Newsgroups: comp.sys.next Subject: Re: bits per pixel (was: NeXT General Educational Disqucount?) Message-ID: <721@rosie.NeXT.COM> Date: 14 May 91 00:57:30 GMT References: <1991May12.205753.23335@neon.Stanford.EDU> Sender: news@NeXT.COM Lines: 49 Nntp-Posting-Host: palantir.next.com In article <1991May12.205753.23335@neon.Stanford.EDU> ly@neon.Stanford.EDU (Eric Ly) writes: > This is my guess as to the way it works. The frame buffers for the > Monochrome, NSC, and ND screens are indeed 2 bits, 12 bits and 24 bits > in depth, respectively. > <> Actually, the VRAM for the MegaPixel Display, NeXTstation Color, and NeXTdimension are 2 bits, 16 bits, and 32 bits per pixel in depth, respectively. For display, the NeXTstation Color uses 4 bits each of RGB, and the NeXTdimension uses 8 bits each of RGB. The extra 4|8 bits aren't used by the display hardware; they pad each pixel to be halfword|word aligned for optimal memory bus performance. The depth of a particular window (what Eric calls a "PostScript pixelmap") is indeed independant from the depth of the display. When a particular window is displayed on the screen, it is automatically dithered to the depth of the VRAM. Each window depth can have an "alpha channel" associated with it. This contains a transparency value for each pixel which is used during compositing (overlaying of bitmap images). There are currently four window depths to choose from: NX_TwoBitGrayDepth 2 bits gray + 2 bits alpha NX_EightBitGrayDepth 8 bits gray + 8 bits alpha NX_TwelveBitRGBDepth 4 bits each RGB + 4 bits alpha NX_TwentyFourBitRGBDepth 8 bits each RGB + 8 bits alpha In the case of the grayscale window depths, memory to store the alpha channel is allocated lazily. That is, the Window Server will only use 2|8 bits per pixel unless you start drawing with transparent ink. This will cause the 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