NAME

cxGeoABGRAdd - add packed color(s) to the current geometry object

C SPECIFICATION

#include <cx/Geometry.h>

enum cxGeoBindingLevel { CX_GEO_PER_DEFAULT, CX_GEO_PER_OBJECT, CX_GEO_PER_PART, CX_GEO_PER_FACE, CX_GEO_PER_FACE_INDEXED, CX_GEO_PER_VERTEX, CX_GEO_PER_VERTEX_INDEXED };

void cxGeoABGRAdd(int n, unsigned int *abgr, cxGeoBindingLevel per)

FORTRAN SPECIFICATION

integer CX_GEO_PER_DEFAULT
integer CX_GEO_PER_OBJECT
integer CX_GEO_PER_PART
integer CX_GEO_PER_FACE
integer CX_GEO_PER_FACE_INDEXED
integer CX_GEO_PER_VERTEX
integer CX_GEO_PER_VERTEX_INDEXED

parameter (CX_GEO_PER_DEFAULT = 0) parameter (CX_GEO_PER_OBJECT = 1) parameter (CX_GEO_PER_PART = 2) parameter (CX_GEO_PER_FACE = 3) parameter (CX_GEO_PER_FACE_INDEXED = 4) parameter (CX_GEO_PER_VERTEX = 5) parameter (CX_GEO_PER_VERTEX_INDEXED = 6)

subroutine cxGeoABGRAdd(n,abgr,per) integer n integer abgr(n) integer per

PARAMETERS

n
The number of ABGR packed colors passed in.
abgr
An array of ABGR colors, four byte values passed in a 32-bit word for each color.
per
A flag indicating how colors are to be applied.

DESCRIPTION

This function adds colors to the current point set. The colors are specified in four bytes passed in a 32-bit word. This way of passing colors is more compact than using cxGeoColorAdd(3E), taking less memory to store and less time to transcribe. ABGR stands for alpha (opacity), blue, green, and red respectively. The colors are mapped from 0 (full off) to 255 (full on).

Colors may be applied in different ways, depending on the setting of the per flag:

CX_GEO_PER_OBJECT
a single attribute is used over the entire object
CX_GEO_PER_FACE
a different attribute is applied on each face (valid for polygons, triangles, and grids)
CX_GEO_PER_VERTEX
a different attribute is applied per vertex (valid for points, lines, polygons, triangles, and grids)
CX_GEO_PER_VERTEX_INDEXED
a different attribute is applied on each reference to a vertex (valid for lines, polygons, and triangles)

SEE ALSO

cxGeoColorAdd(3E)

KNOWN PROBLEMS

Using this function applies both a color and a transparency to an object. In many cases, the alpha values will all be 255 (completely opaque). However, Open Inventor does not know that all alpha values are 255, and will treat this as a potentially transparent object. This may cause some inefficiencies in rendering.
Last modified: May 26 13:58 1999
[ Documentation Home ]
© The Numerical Algorithms Group Ltd, Oxford UK. 1999