.TH "SoGLColorIndexElement" 3 "Tue Jun 23 2026 23:48:38" "Version 4.0.10" "Coin" \" -*- nroff -*- .ad l .nh .SH NAME SoGLColorIndexElement \- The \fBSoGLColorIndexElement\fP class sets the current OpenGL color\&. .SH SYNOPSIS .br .PP .PP \fR#include \fP .PP Inherits \fBSoReplacedElement\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "virtual void \fBinit\fP (\fBSoState\fP *state)" .br .ti -1c .RI "int32_t \fBgetNum\fP (void) const" .br .ti -1c .RI "int32_t \fBget\fP (const int index) const" .br .in -1c Public Member Functions inherited from \fBSoReplacedElement\fP .in +1c .ti -1c .RI "virtual SbBool \fBmatches\fP (const \fBSoElement\fP *element) const" .br .ti -1c .RI "virtual \fBSoElement\fP * \fBcopyMatchInfo\fP () const" .br .ti -1c .RI "SbUniqueId \fBgetNodeId\fP () const" .br .ti -1c .RI "virtual void \fBprint\fP (FILE *file) const" .br .in -1c Public Member Functions inherited from \fBSoElement\fP .in +1c .ti -1c .RI "const \fBSoType\fP \fBgetTypeId\fP (void) const" .br .ti -1c .RI "int \fBgetStackIndex\fP (void) const" .br .ti -1c .RI "virtual void \fBpush\fP (\fBSoState\fP *state)" .br .ti -1c .RI "virtual void \fBpop\fP (\fBSoState\fP *state, const \fBSoElement\fP *prevTopElement)" .br .ti -1c .RI "void \fBsetDepth\fP (const int \fBdepth\fP)" .br .ti -1c .RI "int \fBgetDepth\fP (void) const" .br .ti -1c .RI "virtual \fB~SoElement\fP ()" .br .in -1c .SS "Static Public Member Functions" .in +1c .ti -1c .RI "static \fBSoType\fP \fBgetClassTypeId\fP (void)" .br .ti -1c .RI "static int \fBgetClassStackIndex\fP (void)" .br .ti -1c .RI "static void * \fBcreateInstance\fP (void)" .br .ti -1c .RI "static void \fBinitClass\fP (void)" .br .ti -1c .RI "static SbBool \fBisColorIndexMode\fP (\fBSoState\fP *state)" .br .ti -1c .RI "static void \fBset\fP (\fBSoState\fP *const state, \fBSoNode\fP *const node, const int32_t numindices, const int32_t *const indices)" .br .ti -1c .RI "static const \fBSoGLColorIndexElement\fP * \fBgetInstance\fP (\fBSoState\fP *state)" .br .ti -1c .RI "static int32_t \fBgetDefault\fP (void)" .br .in -1c Static Public Member Functions inherited from \fBSoReplacedElement\fP .in +1c .ti -1c .RI "static \fBSoType\fP \fBgetClassTypeId\fP (void)" .br .ti -1c .RI "static int \fBgetClassStackIndex\fP (void)" .br .ti -1c .RI "static void \fBinitClass\fP (void)" .br .in -1c Static Public Member Functions inherited from \fBSoElement\fP .in +1c .ti -1c .RI "static void \fBinitClass\fP (void)" .br .ti -1c .RI "static \fBSoType\fP \fBgetClassTypeId\fP (void)" .br .ti -1c .RI "static int \fBgetClassStackIndex\fP (void)" .br .ti -1c .RI "static void \fBinitElements\fP (void)" .br .ti -1c .RI "static int \fBgetNumStackIndices\fP (void)" .br .ti -1c .RI "static \fBSoType\fP \fBgetIdFromStackIndex\fP (const int \fBstackIndex\fP)" .br .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "virtual \fB~SoGLColorIndexElement\fP ()" .br .in -1c Protected Member Functions inherited from \fBSoReplacedElement\fP .in +1c .ti -1c .RI "virtual \fB~SoReplacedElement\fP ()" .br .in -1c Protected Member Functions inherited from \fBSoElement\fP .in +1c .ti -1c .RI "\fBSoElement\fP (void)" .br .ti -1c .RI "void \fBcapture\fP (\fBSoState\fP *const state) const" .br .ti -1c .RI "virtual void \fBcaptureThis\fP (\fBSoState\fP *state) const" .br .ti -1c .RI "void \fBsetTypeId\fP (const \fBSoType\fP \fBtypeId\fP)" .br .ti -1c .RI "void \fBsetStackIndex\fP (const int index)" .br .ti -1c .RI "\fBSoElement\fP * \fBgetNextInStack\fP (void) const" .br .ti -1c .RI "\fBSoElement\fP * \fBgetNextFree\fP (void) const" .br .in -1c .SS "Additional Inherited Members" Static Protected Member Functions inherited from \fBSoReplacedElement\fP .in +1c .ti -1c .RI "static \fBSoElement\fP * \fBgetElement\fP (\fBSoState\fP *const state, const int \fBstackIndex\fP, \fBSoNode\fP *const node)" .br .in -1c Static Protected Member Functions inherited from \fBSoElement\fP .in +1c .ti -1c .RI "static \fBSoElement\fP * \fBgetElement\fP (\fBSoState\fP *const state, const int \fBstackIndex\fP)" .br .ti -1c .RI "static const \fBSoElement\fP * \fBgetConstElement\fP (\fBSoState\fP *const state, const int \fBstackIndex\fP)" .br .ti -1c .RI "static int \fBcreateStackIndex\fP (const \fBSoType\fP id)" .br .in -1c Protected Attributes inherited from \fBSoReplacedElement\fP .in +1c .ti -1c .RI "SbUniqueId \fBnodeId\fP" .br .in -1c Protected Attributes inherited from \fBSoElement\fP .in +1c .ti -1c .RI "\fBSoType\fP \fBtypeId\fP" .br .ti -1c .RI "int \fBstackIndex\fP" .br .ti -1c .RI "int \fBdepth\fP" .br .in -1c Static Protected Attributes inherited from \fBSoElement\fP .in +1c .ti -1c .RI "static int \fBclassStackIndex\fP" .br .ti -1c .RI "static \fBSoTypeList\fP * \fBstackToType\fP" .br .in -1c .SH "Detailed Description" .PP The \fBSoGLColorIndexElement\fP class sets the current OpenGL color\&. This element is only used when the OpenGL canvas is in color index mode, i\&.e\&. where colors for individual pixels are fetched from a color lookup table ("CLUT")\&. The usual thing to do is to set up a canvas in RGBA true color mode\&. .PP One common use for color index mode OpenGL canvases is to use one in the overlay planes (which are usually limited to only 2 or 4 available colors), if supported by the OpenGL hardware and / or driver\&. .PP \fBSee also\fP .RS 4 \fBSoColorIndex\fP .RE .PP .SH "Constructor & Destructor Documentation" .PP .SS "SoGLColorIndexElement::~SoGLColorIndexElement ()\fR [protected]\fP, \fR [virtual]\fP" Destructor\&. .SH "Member Function Documentation" .PP .SS "\fBSoType\fP SoGLColorIndexElement::getClassTypeId (void )\fR [static]\fP" This static method returns the \fBSoType\fP object associated with objects of this class\&. .SS "int SoGLColorIndexElement::getClassStackIndex (void )\fR [static]\fP" This static method returns the state stack index for the class\&. .SS "void * SoGLColorIndexElement::createInstance (void )\fR [static]\fP" \fIThis API member is considered internal to the library, as it is not likely to be of interest to the application programmer\&.\fP .br .br Creates a new instance of the class type corresponding to the \fBSoType\fP object\&. .SS "void SoGLColorIndexElement::initClass (void )\fR [static]\fP" Initialize relevant common data for all instances, like the type system\&. .SS "SbBool SoGLColorIndexElement::isColorIndexMode (\fBSoState\fP * state)\fR [static]\fP" Returns \fRTRUE\fP if the current GL context is in color index mode\&. .SS "void SoGLColorIndexElement::init (\fBSoState\fP * state)\fR [virtual]\fP" This function initializes the element type in the given \fBSoState\fP\&. It is called for the first element of each enabled element type in \fBSoState\fP objects\&. .PP Reimplemented from \fBSoReplacedElement\fP\&. .SS "void SoGLColorIndexElement::set (\fBSoState\fP *const state, \fBSoNode\fP *const node, const int32_t numindices, const int32_t *const indices)\fR [static]\fP" Sets current color indices\&. .SS "const \fBSoGLColorIndexElement\fP * SoGLColorIndexElement::getInstance (\fBSoState\fP * state)\fR [static]\fP" Returns the current element\&. .SS "int32_t SoGLColorIndexElement::getNum (void ) const" Returns number of color indices in element\&. .SS "int32_t SoGLColorIndexElement::get (const int index) const" Returns the index'th color index in element\&. .SS "int32_t SoGLColorIndexElement::getDefault (void )\fR [static]\fP" Returns the default color index in element\&. .SH "Author" .PP Generated automatically by Doxygen for Coin from the source code\&.