Frame buffer depth
Larry Martell
st-andy!larry at uunet.uu.net
Thu Jun 6 00:17:00 AEST 1991
In article <2883 at brchh104.bnr.ca> crawford at eagle.crd.ge.com (Carl Crawford) writes:
>I am using a number of Sparcstations under Sunview. Some of the Sparcs are
>1 bit monochrome and some are 8 bit gray scale. From within a program how
>can you tell which frame buffer your system has?
>
The depth of the frame buffer is kept in the pw_pixrect->pr_depth member
of the Pixwin struct. For a window you get a pointer to the Pixwin struct
using window_get:
Canvas canvas;
Pixwin *pw;
pw = (Pixwin *)window_get(canvas,WIN_PIXWIN);
For a canvas use canvas_pixwin:
pw = (Pixwin *)canvas_pixwin(canvas);
In ether case the frame buffer depth can be found in:
pw->pw_pixrect->pr_depth
See page 108 of ther SunView Programmers Guide: "Is My Application Running
on a Color Display?"
--
Larry Martell "Opinions are like assholes; everybody has one,
212-668-9478 but nobody wants to look at the other guys"
uunet!st-andy!larry
More information about the Comp.sys.sun
mailing list