define the template for the virtual palette
group+OPort PALvirt<struct_name = "PALvirt",
struct_bitmask = "PALvirtBitmask",
NEnumColors=6,
NEcolor0=0xff0000,NEcolor1=0xffff00,
NEcolor2=0x00ff00,NEcolor3=0x00ffff,
NEcolor4=0x0000ff,NEcolor5=0xff00ff> {
int update;
int vclass;
int vid;
int share;
float gamma;
int cube_size;
cmethod+notify_inst init = "PALvirtif_init";
cmethod+notify_val upd = "PALvirtif_update";
cmethod+notify_deinst delete = "PALvirtif_delete";
};
PALvirt is the template for the virtual palette. You use PALvirt when you plan to create your own virtual palette. Otherwise, you can use one of PALvirt's predefined subclasses, like BestVirtPal.
This parameter is used internally by the Graphics Display Kit.
This parameter specifies the visual class:
1 Default visual -- uses the system's default visual
2 Best visual -- uses a renderer-chosen "best" visual
3 PseudoColor visual
4 DirectColor visual
5 TrueColor visual
An alternative to vclass, this parameter identifies a visual by its visual id. Visual id takes precedence over visual class if both are supplied.
This parameter determines whether the palette's colormap is shareable:
0 -- Not shareable. A new system palette is created for the virtual palette, and that system palette is not shared with any other virtual palette.
1 -- Shareable. The Graphics Display Kit tries to find a suitable existing system palette for the virtual palette. The existing system palette must be shareable and have compatible attributes. If it cannot find one, the Graphics Display Kit creates a new system palette, which is shareable.
The desired gamma correction value to be used in the view. The following procedure is used to set the gamma value. If the gamma value is set, it is used. If the gamma value is not set, the value of the AVS_GAMMA environment variable is used if it is set; otherwise, the value of LUI_GAMMA that is defined on a per platform basis in include/avs/port.h is used. This provides the ability to define specific gamma values per platform but allows two different mechanisms for overriding that value -- AVS_GAMMA and V code.
(applicable only to PseudoColor visuals) The desired red-green-blue cube size. The red, green, and blue components of a color form a three-dimensional array. cube_size is the size in each dimension. cube_size can be 2 through 6. The larger the cube size the greater the number of colors. When creating a palette at run time, the Graphics Display Kit reduces the cube size if the size exceeds the available resources. For PseudoColor visuals, a cube size must be specified.
Libraries.Graphics_Display.Views.View3D