HP c3700 hp workstations - hp-ux 11.x graphics administration guide - Page 75

colormaps is not available for use by clients. The server handles

Page 75 highlights

Chapter 3 configuring X Windows on HP-UX (other graphics cards) hp Fire GL-UX configuration hints { /* 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 segment is not complete; however, its main purpose is to give an idea of how to find an overlay visual having transparency. When the overlay planes are enabled, one colormap entry in PseudoColor colormaps is not available for use by clients. The server handles this entry in one of two ways depending upon the setting of the "CountTransInOvlyVis" device option. If the option is not set, the server will report that 256 colormap entries are available for allocation in the PseudoColor visual. However, the transparent pixel will always remain transparent. The image layer will be visible wherever this pixel value is rendered in the overlay planes. Hence, applications should not render using this pixel unless transparency is desired. 73

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89

configuring X Windows on HP-UX (other graphics cards)
hp Fire GL-UX configuration hints
Chapter 3
73
{
/* 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 segment is not complete; however, its main purpose is to
give an idea of how to find an overlay visual having transparency.
When the overlay planes are enabled, one colormap entry in PseudoColor
colormaps is not available for use by clients. The server handles this
entry in one of two ways depending upon the setting of the "Count-
TransInOvlyVis" device option. If the option is not set, the server will
report that 256 colormap entries are available for allocation in the
PseudoColor visual. However, the transparent pixel will always remain
transparent. The image layer will be visible wherever this pixel value is
rendered in the overlay planes. Hence, applications should not render
using this pixel unless transparency is desired.