SoGLColorIndexElement(3)

πŸ“¦ version 3.1.3, in fedora 43, fedora 44

πŸŽ€ SoGLColorIndexElement(3) πŸŽ€

okay bestie, welcome to the SoGLColorIndexElement(3) page β€” this is the Coin library's little guy that handles setting the current OpenGL color when you're living that color-index life. Sit down, hydrate, let's go πŸ’–


✨ NAME ✨

SoGLColorIndexElement β€” the class that sets the current OpenGL color. periodt.


🌈 SYNOPSIS 🌈

#include <Inventor/elements/SoGLColorIndexElement.h>

Inherits SoReplacedElement. yes, it's giving legacy lineage, and we love that for it 🫢

πŸ’« Public Member Functions πŸ’«

  • virtual void init (SoState *state)
  • int32_t getNum (void) const
  • int32_t get (const int index) const

🌸 Public Member Functions inherited from SoReplacedElement 🌸

  • virtual SbBool matches (const SoElement *element) const
  • virtual SoElement * copyMatchInfo () const
  • uint32_t getNodeId () const
  • virtual void print (FILE *file) const

πŸ¦‹ Public Member Functions inherited from SoElement πŸ¦‹

  • const SoType getTypeId (void) const
  • int getStackIndex (void) const
  • virtual void push (SoState *state)
  • virtual void pop (SoState *state, const SoElement *prevTopElement)
  • void setDepth (const int depth)
  • int getDepth (void) const
  • virtual ~SoElement ()

⭐ Static Public Member Functions ⭐

  • static SoType getClassTypeId (void)
  • static int getClassStackIndex (void)
  • static void * createInstance (void)
  • static void initClass (void)
  • static SbBool isColorIndexMode (SoState *state)
  • static void set (SoState *const state, SoNode *const node, const int32_t numindices, const int32_t *const indices)
  • static const SoGLColorIndexElement * getInstance (SoState *state)
  • static int32_t getDefault (void)

πŸ’œ Static Public Member Functions inherited from SoReplacedElement πŸ’œ

  • static SoType getClassTypeId (void)
  • static int getClassStackIndex (void)
  • static void initClass (void)

πŸ“ Static Public Member Functions inherited from SoElement πŸ“

  • static void initClass (void)
  • static SoType getClassTypeId (void)
  • static int getClassStackIndex (void)
  • static void initElements (void)
  • static int getNumStackIndices (void)
  • static SoType getIdFromStackIndex (const int stackIndex)

🧚 Protected Member Functions 🧚

  • virtual ~SoGLColorIndexElement ()

🌷 Protected Member Functions inherited from SoReplacedElement 🌷

  • virtual ~SoReplacedElement ()

πŸ’– Protected Member Functions inherited from SoElement πŸ’–

  • SoElement (void)
  • void capture (SoState *const state) const
  • virtual void captureThis (SoState *state) const
  • void setTypeId (const SoType typeId)
  • void setStackIndex (const int index)
  • SoElement * getNextInStack (void) const
  • SoElement * getNextFree (void) const

πŸ‘‘ Additional Inherited Members πŸ‘‘

  • Static Protected Member Functions inherited from SoReplacedElement
    • static SoElement * getElement (SoState *const state, const int stackIndex, SoNode *const node)
  • Static Protected Member Functions inherited from SoElement
    • static SoElement * getElement (SoState *const state, const int stackIndex)
    • static const SoElement * getConstElement (SoState *const state, const int stackIndex)
    • static int createStackIndex (const SoType id)
  • Protected Attributes inherited from SoReplacedElement
    • uint32_t nodeId
  • Protected Attributes inherited from SoElement
    • SoType typeId
    • int stackIndex
    • int depth
  • Static Protected Attributes inherited from SoElement
    • static int classStackIndex
    • static SoTypeList * stackToType

πŸ¦„ Detailed Description πŸ¦„

The SoGLColorIndexElement class sets the current OpenGL color. that's the whole vibe, no notes πŸ’…

ngl, this element is only used when the OpenGL canvas is in colorindex mode β€” that's where the colors for individual pixels get fetched from a color lookup table (a "CLUT", if you're fancy). The usual thing to do is to set up a canvas in RGBA truecolor mode. like, that's the standard move, bestie, don't overthink it.

One common use for colorindex 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. tiny palette, big drama ✨

πŸ” See also πŸ”

  • SoColorIndex

🧸 Constructor & Destructor Documentation 🧸

SoGLColorIndexElement::~SoGLColorIndexElement () [protected], [virtual]

The destructor. it's protected, so it's giving mysterious, unbothered, unavailable πŸ™ˆ


πŸ’€ Member Function Documentation πŸ’€

void * SoGLColorIndexElement::createInstance (void ) [static]

This API member is considered internal to the library, as it is not likely to be of interest to the application programmer. so like, it's there, but it's not for you, and that's fine 🫢

SbBool SoGLColorIndexElement::isColorIndexMode (SoState * state) [static]

Returns TRUE if the current GL context is in color index mode. yup, just a lil vibe check on your context πŸ’–

void SoGLColorIndexElement::init (SoState * state) [virtual]

This function initializes the element type in the given SoState. It is called for the first element of each enabled element type in SoState objects.

Reimplemented from SoReplacedElement.

void SoGLColorIndexElement::set (SoState *const state, SoNode *const node, const int32_t numindices, const int32_t *const indices) [static]

Sets current color indices. that's it, that's the job πŸŽ€

const SoGLColorIndexElement * SoGLColorIndexElement::getInstance (SoState * state) [static]

Returns the current element. your main character, retrieved 🌟

int32_t SoGLColorIndexElement::getNum (void ) const

Returns number of color indices in element. literally just the count, bestie, she's counting πŸ”’


🌈 Author 🌈

Generated automatically by Doxygen for Coin from the source code. no human wrote this, the robot did, and honestly? she ate πŸ€–πŸ’…


and that's the whole page!! thanks for reading all the way to the bottom, you're iconic for that. this was brought to you by Coin, Version 3.1.3 β€” mwah, take care of yourself, drink some water, and go set some color indices responsibly πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from