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
HP-UX Starbase Device Drivers Manual - Vol1: HP 9000 Series 700 Computers > Chapter 4 The CRX Family of Device Drivers

If You See the Technicolor Effect

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

You can reduce the visual effects of color map thrashing, also called the technicolor effect, and thus reduce distractions due to color map changes. Set the environment variable SB_X_SHARED_CMAP to true to use a shared color map between Starbase and X.

The Starbase device driver and the X server for the GRX, CRX, dual CRX and HP 705/710/715/725 devices support the environment variable which indicates the use of a shared or cooperative color map definition. The environment variable allows sharing of the color map resource by Starbase applications with other X clients. It eliminates the creation and installation of different color maps for each different Starbase application being run.

For generic X Windows

If you are using x11start, make sure you have the environment variable SB_X_SHARED_CMAP set before you execute x11start:

export SB_X_SHARED_CMAP=true

The best way to do this is to include it in your $HOME/.profile.

For HP VUE

If you are using HP VUE (Visual User Environment) add the following line to the end of your 〈vue-config[14]/Xconfig file:

Vuelogin*environment:SB_X_SHARED_CMAP=true

The Xconfig file may contain commented out entries for some of the more popular resources, including "environment". Simply find the line containing "environment", add the appropriate value and uncomment the line.

When using HP VUE with SB_X_SHARED_CMAP set, there is one other resource of interest. The HP VUE *colorUse resource in

vue-config〉/sys.resources

can be set to use less colors if it is desired that HP VUE not use up all the unallocated color map cells. For example, the following line can be placed in the sys.resources file if you want to use just 4 color sets:

vuewm*colorUse: MEDIUM_COLOR

The default value on GRX and CRX is HIGH_COLOR. Additional values are MEDIUM_COLOR and LOW_COLOR. The full range of accepted values for this resource can be found in HP VUE documentation.

Please note that changing the 〈vue-config[15]/sys.resources file will only affect users who initiate an HP VUE session after the change.

To change this setting for an existing user, you can simple change the *colorUse setting via a dialog in the HP VUE Style Manager:

  • log in to VUE

  • select the Style Manager icon from the front panel

  • select Color

  • select "HP VUE Color Use"

  • select the desired color use (High, Medium, Low, B/W, Default)

  • select OK

Color Map Sharing between Starbase and X Windows

This section is an update to the section "Color Map Sharing Starbase and X Windows" in the chapter "The CRX Family of Device Drivers" in the HP-UX Starbase Device Drivers Manual.

SB_X_SHARED_CMAP (environment variable) allows for the sharing of the default color map between X11 and Starbase graphics if you are using GRX, CRX, and Dual CRX graphics devices and Integrated Graphics and Internal Color Graphics Workstations. Enabling this environment variable helps reduce the technicolor effect that occurs between simultaneously active applications. When the SB_X_SHARED_CMAP is set to any value (for example, READ_ONLY_PRIMARIES), the X server initializes the default color map entries as follows:

0 through 7

are assigned to the primary colors.

8 through 39

are reserved for X applications.

40 through 255

are reserved for Starbase rendering and are not to be used by the X server.

To avoid the technicolor effect on these devices, you need to use CMAP_FULL without modifying the color map (for example, define_color_table). On the GRX, applications can determine that the device is grayscale (use inquire_capabilities) and make use of only CMAP_MONOTONIC.

Effects of Starbase Calls

When SB_X_SHARED_CMAP is set to any value at gopen time, your graphics application will function as described in the subsequent sections.

During gopen

If the gopen was done with INIT, then entries 0 through 39 of the Starbase color table are initialized to entries 0 through 39 of the default root color map. Entries 40 through 255 are initialized to a 6|6|6 RGB ramp to be used for color map mode CMAP_FULL type rendering.

If the gopen was done without INIT, then the entries of the color map associated with the window are queried, and these values are used to initialize the Starbase color table. In addition, entries 0 through 39 of this query are saved for future use.

The default shade_mode in effect is CMAP_FULL. On a grayscale device, the default color map mode is CMAP_MONOTONIC (when gopen mode is INIT) since this is the only mode that can be shared.

During shade_mode

If your application makes a shade_mode call with INIT and changes the shade mode to CMAP_NORMAL or CMAP_MONOTONIC, then the Starbase color map table gets initialized to the default values for a CMAP_NORMAL or CMAP_MONOTONIC color map. No attempt is made to preserve entries 0 through 39 of the Starbase color map to those values queried at gopen time.

If your application makes a shade_mode call with INIT to CMAP_FULL mode, then the Starbase color table is initialized back to the shared initialization:

0 through 7

are assigned to the primary colors.

8 through 39

are reserved for X applications.

40 through 255

are reserved for Starbase rendering and are not to be used by the X server.

Enabling Gamma Correction

Gamma correction is not supported in depth 8 visuals. SB_X_SHARED_CMAP is only supported in depth 8 visuals. However, if your application calls the GAMMA_CORRECTION gescape in a depth 8 visual, and the environment variable ENABLE_CRX_GAMMA is not set, the GAMMA_CORRECTION gescape still results in the color map being initialized to the current color map mode.

This implies that a sequence similar to the following can cause a color map to be initialized as if SB_X_SHARED_CMAP were not set:

  1. Set the environment variable SB_X_SHARED_CMAP to TRUE.

  2. Call gopen() with INIT on a window with a depth 8 visual. This will result in entries 0 through 39 being initialized to the shared values, and entries 40 through 255 being initialized to a 6|6|6 RGB ramp to be used for CMAP_FULL type rendering.

  3. Call shade_mode() with CMAP_MONOTONIC, but without INIT. This will set the color map mode to CMAP_MONOTONIC, but will not actually change the color map.

  4. Call the GAMMA_CORRECTION gescape. This will result in the full color map being initialized to a full monotonic ramp without regard to the value of the SB_X_SHARED_CMAP environment variable.

Enabling Double-Buffering

Only 8/8 double-buffering is supported when SB_X_SHARED_CMAP is set and the shade mode is currently CMAP_FULL. Other double-buffer calls (for example, 1/1, 2/2, 3/3, and 4/4, which are referred to as intra-visual double-buffering) will be ignored.

If the current shade mode is not CMAP_FULL, then intra-visual double-buffering is supported as usual.

Other Considerations

If the behavior with SB_X_SHARED_CMAP is unacceptable for a specific application, do not set the environment variable, or if it is already set, unset the environment variable prior to invoking the application or calling gopen (see putenv(3C) in the HP-UX Reference). This will allow the normal color map functionality, but the technicolor effect may be seen.

Shared Color Map Contents

The following table describes the HP 705, 710, 715, 725 default color map for color devices when SB_X_SHARED_CMAP is set and color map mode is CMAP_FULL.

Table 4-4 HP 705, 710, 715, 725 Default Shared Color Map

Index

Type of Cell

Comments

0...7

Read-Only

Same as default Starbase color map

8...38

Read/Write

Allocated dynamically by X server

40...255

Read-Only [1]

Standard 6|6|6 (ramps of six levels each of red, green, and blue)

XA_RGB_DEFAULT_MAP property defined

[1] Can be made writable by setting SB_X_SHARED_CMAP=READ_ONLY_PRIMARIES.

 

The following table describes the GRX default color map when SB_X_SHARED_CMAP is set and the grayscale color map mode is CMAP_MONOTONIC.

Table 4-5 GRX Default Shared Color Map

Index

Type of Cell

Comments

0...255

Read-Only

grayscale ramp Starbase CMAP_MONOTONIC

StaticGray visual class in X

XA_RGB_DEFAULT_MAP property defined

 

The following table describes the CRX default color map for color devices when SB_X_SHARED_CMAP is set and color map mode is CMAP_FULL.

Table 4-6 CRX Default Shared Color Map

Index

Type of Cell

Comments

0...7

Read-Only

Same as default Starbase color map

8...38

Read/Write

Allocated dynamically by X server

40...255

Read-Only [1]

Standard 6|6|6 [2] (ramps of six levels each of red, green, and blue arranged to support special shading hardware)

[1] Can be made writable by setting SB_X_SHARED_CMAP=READ_ONLY_PRIMARIES.

[2] Can be made writable by setting SB_X_SHARED_CMAP=XA_RGB_DEFAULT_MAP (Read-Only).

 

X Considerations

Here are two notes on the X server's use of the SB_X_SHARED_CMAP environment variable:

  • The above tables apply to the default color map of the root visual. Other color maps in the root visual will be entirely read/write, and initialized with a copy of the default color map's current values.

  • The X server sets the XA_RGB_DEFAULT_MAP only if a standard read-only ramp is defined in entries 40 through 255. An Xlib program can read a description of the ramp and the ID of the default color map implementing the same by calling XGetStandardColormap().



[14] The actual path names of directories in angle brackets depend on the file system structure. See the Graphics Administration Guide for details.

[15] The actual path names of directories in angle brackets depend on the file system structure. See the Graphics Administration Guide for details.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1989 - 1995 Hewlett-Packard Development Company, L.P.