This chapter discusses the visuals that are present when running OpenWindows on the SPARCstation 10SX and SPARCstation 20.
The cgfourteen frame buffer is configurable to scan out either 8-bit pixels or 32-bit pixels. This allows the cgfourteen to be used in high resolution modes. For example, you can configure a 4MByte cgfourteen connected to a multi-sync monitor to display 8-bit pixels at 1280x1024 resolution with the command:
/platform/SUNW,SPARCstation-10,SX/sbin/cg14config -r 1280x1024@66 |
When the system is rebooted the monitor displays at the new resolution. Since 4MBytes is insufficient memory to have 32 bits per pixel, invoking OpenWindows will automatically select 8-bit pixels only.
The same hardware, when configured to display at 1152x900 resolution with the command:
/platform/SUNW,SPARCstation-10,SX/sbin/cg14config -r 1152x900@76 |
will allow OpenWindows to use 32 bits per pixel, after rebooting.
In both modes, the left-over VRAM not displayed on the screen is utilized by the window system for pixmap allocation.
It is possible to use the frame buffer in 8-bit pixel mode even when there is sufficient VRAM for 32-bit pixels. There is a significant performance improvement when the frame buffer is in 8-bit pixel mode. To force the pixel mode, put the verb pixelmode="8" in the OWconfig file used by the server. The OWconfig file is typically in /usr/openwin/server/etc.
A complete entry with this in the file would look like:
# CG14 display adapter class="XSCREEN" name="SUNWcg14" ddxHandler="ddxSUNWcg14.so.1" ddxInitFunc="sunCG14Init" pixelmode= "8"; |
When the window system runs in 8-bit mode, it exports the same visuals that are exported by Openwindows 3.3 on other 8-bit frame buffers:
8-bit StaticGray
8-bit GrayScale
8-bit StaticColor
8-bit PseudoColor
8-bit TrueColor and
8-bit DirectColor.
Only one hardware color lookup table is available to be shared by all X11 colormaps.
In 32-bit mode, the server supports a 24-bit TrueColor visual, in addition to all of the visuals present in 8-bit mode.
When the server is started with the following option:
/usr/openwin/bin/openwin -dev /dev/fbs/cgfourteen0 defdepth 8 |
the default visual, in which the root window is created, is an 8-bit PseudoColor visual.
When the following option is used:
/usr/openwin/bin/openwin -dev /dev/fbs/cgfourteen0 defdepth 24 |
the default visual is a 24-bit TrueColor visual.
The phenomenon of seeing the wrong colors in a window because another X11 colormap is installed in the hardware is called false color.
The best way to avoid false color is to use a TrueColor visual. Since all 32 bits are available for TrueColor visuals, the colors always show up correctly. The SX hardware renders 24-bit visuals with the same speed as it renders 8-bit visuals, so there is no performance penalty when using 24-bit visuals.
In 32-bit mode the StaticGray visual has its own dedicated hardware color lookup table (actually a linear ramp). Hence StaticGray windows in 32-bit mode will never cause other 8-bit windows to appear incorrectly.