Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
Graphics Administration Guide: HP 9000 Workstations and Servers > Chapter 5 X Windows: HP-UX 10.x

HCRX and HP Visualize Device-Dependent Information

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

This section includes information on the HCRX-8[Z], HCRX-24[Z], HP Visualize-EG, HP Visualize-8, HP Visualize-24, and HP Visualize-48[XP] graphics devices.

The HCRX-8[Z] is a one-board device (two, with the optional accelerator) that has eight overlay planes, two banks of 8 image planes, and 4 hardware colormaps. This device provides a superset of functionality in the CRX.

The HCRX-24[Z] is a one board device (two, with the optional accelerator) that has eight overlay planes, two banks of 12 image planes, and 4 hardware colormaps. This device provides a superset of functionality in the CRX-24[Z].

The HP Visualize-EG is either an unaccelerated built-in graphics device or a single board unaccelerated graphics device (not counting the optional memory daughter card in either case). This device provides compatible functionality with the Integrated Color Graphics device when in 8 plane mode and has functionality compatible with the HCRX-8 device when in double-buffer mode. See below for a description of these modes. For shorthand notation, from this point on in the document, HP Visualize-EG will refer to either mode, HP Visualize-EG(8) will refer to 8 plane mode only and HP [Dual] Visualize-EG will refer to double-buffer mode only.

The HP Visualize-8 is a two board accelerated device that has eight overlay planes, two banks of 8 image planes, and 4 hardware colormaps. This device provides a superset of functionality in the CRX.

The HP Visualize-24 is a two board accelerated device that has eight overlay planes, two banks of 12 image planes, and 4 hardware colormaps. This device provides a superset of functionality in the CRX-24[Z].

The HP Visualize-48[XP] is a two-board accelerated device that fills two slots. If you add either the optional texture-mapping memory card or the optional video-out card, it becomes a three-board set that fills three slots. Add both optional cards, and it becomes a four-board set, but it still fills only three slots. In any case, it has eight overlay planes, two banks of 24 image planes, and six hardware colormaps. This device provides a superset of functionality in the CRX-48Z. The hardware support for accelerating 2D Xlib primitives is similar to that in the other HCRX devices. The hardware for accelerating 3D geometry, lighting, and shading, is new.

Supported Visuals

The following visuals are supported on the HP Visualize-EG(8):

  • Class PseudoColor Depth 8 Layer Image - supports DBE and MBX software double-buffering

  • Class TrueColor Depth 8 Layer Image - supports DBE and MBX software double-buffering

The following visuals are supported on the HCRX-8[Z], HP [Dual] Visualize-EG and HP Visualize-8:

  • Class PseudoColor Depth 8 Layer Image - supports DBE and MBX hardware double-buffering

  • Class PseudoColor Depth 8 Layer Overlay - (see Note) supports DBE and MBX software double-buffering

  • Class PseudoColor Depth 8 Layer Overlay Transparent - (see Note) supports DBE and MBX software double-buffering

  • Class TrueColor Depth 8 Layer Image - supports DBE and MBX hardware double-buffering

NOTE: The two overlay visuals are mutually exclusive, based on the presence of the EnableOverlayTransparency screen option (i.e., if the EnableOverlayTransparency screen option is set, then the visual that supports transparency is available, otherwise the visual which does not support transparency is available).

The following visuals are supported on the HCRX-24[Z] and HP Visualize-24:

  • Class PseudoColor Depth 8 Layer Image - supports DBE and MBX hardware double-buffering

  • Class PseudoColor Depth 8 Layer Overlay - supports DBE and MBX software double-buffering

  • Class PseudoColor Depth 8 Layer Overlay Transparent - supports DBE and MBX software double-buffering

  • Class TrueColor Depth 8 Layer Image - supports DBE and MBX hardware double-buffering

  • Class DirectColor Depth 12 Layer Image - supports DBE and MBX hardware double-buffering

  • Class TrueColor Depth 12 Layer Image - supports DBE and MBX hardware double-buffering

  • Class DirectColor Depth 24 Layer Image - doesn't support DBE and MBX double-buffering

  • Class TrueColor Depth 24 Layer Image - doesn't support DBE and MBX double-buffering

The following visuals are supported on the HP Visualize-48[XP]:

  • Class PseudoColor Depth 8 Layer Image - supports DBE and MBX hardware double-buffering

  • Class PseudoColor Depth 8 Layer Overlay - supports DBE and MBX software double-buffering

  • Class PseudoColor Depth 8 Layer Overlay Transparent - supports DBE and MBX software double-buffering

  • Class TrueColor Depth 8 Layer Image - supports DBE and MBX hardware double-buffering

  • Class DirectColor Depth 24 Layer Image - supports DBE and MBX hardware double-buffering

  • Class TrueColor Depth 24 Layer Image - supports DBE and MBX hardware double-buffering

Supported Screen Options

The following Screen Options are supported:

  • CountTransparentInOverlayVisual

  • DisableColorRecovery

  • EnableOverlayTransparency (HCRX-8[Z], HP [Dual] Visualize-EG and HP Visualize-8 only)

  • SwapBuffersOnVBlank

  • ImageTextViaBitMap

  • CRX24_FULL_DEFAULT_VISUAL (HCRX-24[Z] only)

  • EnableIncludeInferiorsFix

HP Visualize-EG Modes

The following modes are supported:

  • 8 Plane mode

  • Double-Buffer mode

The modes are set from the Boot-Admin at bootup time by selecting from the menu of options a configuration that supports double-buffer or not. From that point on (without rebooting) the server will use the selected mode.

Eight-plane mode is compatible with the Integrated Color Graphics device. It has eight image planes and uses only software double-buffering.

Double-Buffer mode is compatible with the HCRX-8 device. This mode requires an optional memory daughter card. If the daughter card is installed, selecting this mode will result in eight overlay planes and 16 image planes (the same as HCRX-8 and HP Visualize-8 devices). Double-Buffer mode allows the use of hardware double-buffering.

HCRX Configuration Hints

HCRX-8[Z], HP [Dual] Visualize-EG and HP Visualize-8 Visuals and Double-Buffer Support

The eight-plane HCRX-8[Z], HP [Dual] Visualize-EG and HP Visualize-8 are the first members of the Series 700 graphics family whose overlay planes and image planes are both depth 8.

  • There are two depth-8 PseudoColor visuals (one in the overlay planes, the other in the image planes). There is also a depth-8 TrueColor visual in the image planes.

  • The default visual (where the root window and default colormap reside) is in the overlay planes. A DefaultVisual specification in a Screen Entry in the X*screens file may instead locate the default visual in the Image Planes (see the X*screens File section, above).

  • Fast 8/8 double-buffering (two hardware buffers) is supported in the depth-8 image planes, but not in the overlays. The overlay planes support the slower virtual-memory-based double-buffering.

Implications and Suggestions for HCRX-8[Z], HP [Dual] Visualize-EG and HP Visualize-8

The default colormap cannot be used with a window in a non-default visual, even one of the same depth as the default visual.

Before trying to use the default colormap in a depth-8 window, verify that the window is in the default visual. If the window is not in the default visual, create a colormap in that visual. This process of creating a non-default colormap is the same as the one used to create windows in depth-12 or depth-24 visuals.

If you have an application that assumes that the default colormap can be used with any depth-8 window (even one in an image-plane visual) specify an image-plane visual as the default.

Unlike the CRX, the HCRX-8[Z]'s default visual the HP [Dual] Visualize-EG's default visual and the HP Visualize-8's default visual do not have fast hardware double-buffering (but the image planes do).

To obtain hardware double-buffering, find a visual in the image planes. The best method is to find all the depth-8 PseudoColor visuals returned by XGetVisualInfo and then eliminate the visuals that are reported in the SERVER_OVERLAY_VISUALS property (discussed below).

If you have an application that assumes the default visual has fast double-buffering, specify an image plane visual as the default.

HCRX Overlay Visuals and Overlay Transparency

As on the CRX-24[Z] and CRX-48Z, a property on the root window,SERVER_OVERLAY_VISUALS, is used to describe the visuals that are in the overlay planes.

Overlay Transparency on the HCRX-8[Z], HP [Dual] Visualize-EG and HP Visualize-8

The HCRX-8[Z], HP [Dual] Visualize-EG and HP Visualize-8 each have one visual in the overlay planes (depth-8 PseudoColor). By default, this overlay visual has no transparent index available to applications for rendering transparency. This means the overlay windows with "floating text" are not supported in the typical X server operation on the HCRX-8[Z], HP [Dual] Visualize-EG or HP Visualize-8.

For applications that require transparent overlay windows on the HCRX-8[Z], HP Visualize-EG(D) or HP Visualize-8, an optional X server mode is available to allow for overlay transparency, but it is restrictive. In this optional mode, overlay colormaps provide a single entry that can be used to render transparency. Only one hardware colormap is available in the overlays (instead of two) and only one hardware colormap is available in the image planes (instead of two).

To activate this optional X server mode to enable transparency, set the EnableOverlayTransparency screen option. You will need to restart the X server for the option to take effect.

With this mode enabled, colormaps created in the default visual have 255 entries; entry 256 is reserved for transparency. As on the CRX-24[Z] and CRX-48Z, the screen option CountTransparentInOverlayVisual can be used to include the transparent index in the colormap size (256 entries instead of 255).

Title not available (Overlay Transparency on the HCRX-8[Z], HP [Dual] Visualize-EG and HP Visualize-8 )

Programmers' Note

If transparency is not enabled, there are only 252 colors available. Entries 252-255 are not writable, and should not be used; there are only 252 colormap entries available, even though the server states that there are 256.

Overlay Transparency on the HCRX-24[Z], HP Visualize-24, and HP Visualize-48[XP]

The HCRX-24[Z], HP Visualize-24, and HP Visualize-48[XP] have two visuals in the overlay planes, both depth-8 PseudoColor.

The default overlay visual has 256 entries per colormap and no transparency.

The second overlay visual has 255 entries per colormap and supports transparency in the same way as the CRX-24[Z]. As on the CRX-24[Z] and CRX-48Z, the screen option EnableOverlayTransparency can be used to include the transparent index in the colormap size (256 entries instead of 255).

To allow applications to determine which visuals are in the overlay planes, both overlay visuals are listed in the SERVER_OVERLAY_VISUALS property attached to the root window. The default overlay visual has a transparent type of 0 (None) while the transparent overlay visual has a transparent type of 1 (TransparentPixel).

If you need an overlay colormap that supports transparency, create the colormap using the visual that has transparency in its SERVER_OVERLAY_VISUALS property. To look at the contents of this property, you would use code similar to the following:

{
typedef struct {
VisualID overlayVisualID;
Card32 transparentType;/* None, TransparentPixel, TransparentMask */
Card32 value; /* Either pixel value or pixel mask */
Card32 layer;
} OverlayVisualPropertyRec;

OverlayVisualPropertyRec *pOverlayVisuals, *pOVis;
XVisualInfo getVis;
XVisualInfo *pVisuals;
Atom overlayVisualsAtom, actualType;
...
/* Get the visuals for this screen and allocate. */
getVis.screen = screen;
pVisuals = XGetVisualInfo(display, VisualScreenMask, &getVis, &nVisuals);
pOverlayVisuals = (OverlayVisualPropertyRec *)
malloc ( (size_t)nVisuals * sizeof(OverlayVisualPropertyRec) );

/* Get the overlay visual information for this screen. Obtain
* this information from the SERVER_OVERLAY_VISUALS property. */
overlayVisualsAtom = XInternAtom(display, "SERVER_OVERLAY_VISUALS", True);
if (overlayVisualsAtom != None)
{
/* Since the Atom exists, request the property's contents. */
bytesAfter = 0;
numLongs = ( nVisuals * sizeof(OverlayVisualPropertyRec) + 3 ) / 4;
XGetWindowProperty(display, RootWindow(display, screen),
overlayVisualsAtom, 0, numLongs, False,
AnyPropertyType, &actualType, &actualFormat,
&numLongs, &bytesAfter, &pOverlayVisuals);
if ( bytesAfter != 0 ) {/* Serious Failure Here */} ;

/* Loop through the pOverlayVisuals array. */
...
nOVisuals = numLongs/sizeof(OverlayVisualPropertyRec);
pOVis = pOverlayVisuals;

while (nOVisuals >= 0)
{
if ( pOVis->transparentType == TransparentPixel )
{/* Found a transparent overlay visual, set ident. aside. */};
pOVis++;
}
XFree(pOverlayVisuals);
/* There might be some additional checking of the found
transparent overlay visuals wanted; e.g., for depth. */
}
XFree(pVisuals);
}

This program fragment is not complete; its main purpose is to give the idea of how to find an overlay visual having transparency.

HCRX Colormaps

The following information discusses the number of supported colormaps for the HCRX configurations.

HP Visualize-EG(8): 8 Image planes

The image planes contain the default colormap permanently installed in the hardware plus one other hardware colormap available to applications. No issues involving transparency exist because of the lack of Overlay planes.

HCRX-8[Z], HP [Dual] Visualize-EG and HP Visualize-8: Eight Overlay Planes and Two Depth-8 Banks of Image Planes

When the default visual is in the overlay planes (default location) and the screen option EnableOverlayTransparency is not set, the overlay planes contain the default colormap permanently installed in the hardware, plus one other hardware colormap available to applications. The image planes contain two hardware colormaps each usable by applications.

When the default visual is in the image planes and the screen option EnableOverlayTransparency is not set, the overlay planes contain a single hardware colormap available to applications, plus a colormap reserved by the server (i.e., unavailable to applications) to guarantee the existence of transparency, and the image planes contain the default colormap permanently installed into the hardware, plus one other hardware colormap available to applications.

When the screen option EnableOverlayTransparency is set, both the overlay planes and the image planes have access to one hardware colormap. The default colormap is not permanently installed in the hardware and is in the overlay planes by default, but the Default Visual can be located in the image planes as described in a previous section.

HCRX-24[Z] and HP Visualize-24: Eight Overlay Planes and 24 Image Planes

The overlay planes contain the default colormap permanently installed in the hardware, plus one other hardware colormap available to applications. The image planes contain two hardware colormaps, each usable by applications.

Although two hardware colormaps are available to applications in the image planes, a hardware restriction allows only one depth-12 or depth-24 colormap to be installed at any given time. Therefore, if two applications are run simultaneously and use different depth-12 or depth-24 colormaps, the application that has the colormap focus looks correct and the other is technicolored.

HP Visualize-48[XP]: Eight Overlay Planes and 48 Image Planes

The overlay planes contain the default colormap permanently installed in the hardware, plus one other hardware colormap available to applications. The image planes contain four hardware colormaps, each usable by applications.

The four hardware colormaps in the image planes can be treated as depth-8 or depth-24 colormaps. There are no restrictions on the types of colormaps that can be installed in the hardware at any given time. All four colormaps can be used with any visual class.

Accessing HP Color Recovery Technology via Xlib

Color Recovery is a technique to generate a better picture by attempting to eliminate the graininess caused by dithering. Access to the Color Recovery capability is transparent when using a 3D graphics API such as Starbase, HP-PHIGS or PEX. If you are producing graphics using Xlib calls, your application must perform some of the necessary processing. At server startup (if Color Recovery is not disabled in the X*screens file), the _HP_RGB_SMOOTH_MAP_LIST property is defined and placed on the root window.

The above property is of type RGB_COLOR_MAP and carries pointers to structures of type XStandardColormap. It may be interrogated with calls to XGetRGBColormaps. The property _HP_RGB_SMOOTH_MAP_LIST is a list of colormaps that are associated with window visual IDs that support Color Recovery. When the XGetRGBColormaps routine searches this list for a colormap with a visual ID that matches your window's visual ID and it finds one, your application knows that your visual supports Color Recovery, and uses that colormap for any Color Recovery window in your window's visual.

Color Recovery uses all 256 entries of one of the available colormaps. The color visual used by Color Recovery emulates the 24-bit TrueColor visual, thus, the colors red, green, and blue are typically declared as integers in the range from 0 to 255. Note that each window that uses Color Recovery will have the same colormap contents.

For Color Recovery to produce the best results, the emulated 24-bit TrueColor data is dithered as explained below.

A pixel to be dithered is sent to the routine provided in this example. Note that the values of the variables RedValue, GreenValue, and BlueValue are generated by an application. In this example, the color values are assumed to be in the range 0..255.

The given routine receives the color values and the X and Y window address (Xp and Yp) of the pixel. The X and Y address is used to access the dither tables. The values from the dither tables are added to the color values. After the dither addition, the resultant color values are quantized to three bits of red and green and two bits of blue. The quantized results are packed into an 8-bit unsigned char and then stored in the frame buffer. In the process of sending the contents of the frame buffer to the CRT, a special section in the hardware then converts the frame buffer's 8-bit data into a 24-bit TrueColor data for display.

Here is a routine that can be used to dither the 24-bit TrueColor data.

unsigned char dither_pixel_for_CR(RedValue,GreenValue,BlueValue,Xp,Yp)
int RedValue,GreenValueBlueValue,Xp,Yp;
{
static short dither_red[2][16] = {
{-16, 4, -1, 11,-14, 6, -3, 9,-15, 5, -2, 10,-13, 7, -4, 8},
{ 15, -5, 0,-12, 13, -7, 2,-10, 14, -6, 1,-11, 12, -8, 3, -9}};
static short dither_green[2][16] = {
{ 11,-15, 7, -3, 8,-14, 4, -2, 10,-16, 6, -4, 9,-13, 5, -1},
{-12, 14, -8, 2, -9, 13, -5, 1,-11, 15, -7, 3,-10, 12, -6, 0}};
static short dither_blue[2][16] = {
{ -3, 9,-13, 7, -1, 11,-15, 5, -4, 8,-14, 6, -2, 10,-16, 4},
{ 2,-10, 12, -8, 0,-12, 14, -6, 3, -9, 13, -7, 1,-11, 15, -5}};
int red, green, blue;
int x_dither_table, y_dither_table;
unsigned char pixel;

/* Determine the dither table entries to use based on the pixel address */
x_dither_table = Xp % 16; /* X Pixel Address MOD 16 */
y_dither_table = Yp % 2; /* Y Pixel Address MOD 2 */

/* Start with the initial values as supplied by the calling routine */
red = RedValue;
green = GreenValue;
blue = BlueValue;

/* Generate the red dither value */
if (red >= 48) /* 48 is a constant required by this routine */
red=red-16;
else
red=red/2+8;
red += dither_red[y_dither_table][x_dither_table];
/* Check for overflow or underflow on red value */
if (red > 0xff) red = 0xff;
if (red < 0x00) red = 0x00;

/* Generate the green dither value */
if (green >= 48) /* 48 is a constant required by this routine */
green=green-16;
else
green=green/2+8;
green += dither_green[y_dither_table][x_dither_table];
/* Check for overflow or underflow on green value */
if (green > 0xff) green = 0xff;
if (green < 0x00) green = 0x00;
    /* Generate the blue dither value */
if (blue >= 112) /* 112 is a constant required by this routine */
blue=blue-32;
else
blue=blue/2+24;
blue += (dither_blue[y_dither_table][x_dither_table]<<1);
/* Check for overflow or underflow on blue value */
if (blue > 0xff) blue = 0xff;
if (blue < 0x00) blue = 0x00;

pixel = ((red &0xE0) | ((green &0xE0) >> 3) | ((blue &0xC0) >> 6));
return(pixel);
}
Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1996 Hewlett-Packard Development Company, L.P.