SoGLCacheContextElement(3)
π SoGLCacheContextElement π β the Coin manual page, bestie edition
okay so. you opened the Coin manual and landed on SoGLCacheContextElement(3). this class handles the OpenGL cache for a context. that's it, that's the whole vibe, and yet there's SO much here. buckle up π
πΈ NAME πΈ
SoGLCacheContextElement β the class that handles the OpenGL cache for a context. lowkey the backstage crew of your render, fr fr.
β¨ SYNOPSIS β¨
#include <Inventor/elements/SoGLCacheContextElement.h>
Inherits SoElement. (yes bestie, it's giving nepo baby of the element family, but make it useful π
)
π«Ά Public Types
enum { DO_AUTO_CACHE = 1, DONT_AUTO_CACHE }β the two moods you can be in about auto caching.
π«Ά Public Member Functions
virtual void init (SoState *state)virtual SbBool matches (const SoElement *elt) constvirtual SoElement * copyMatchInfo (void) const
π Public Member Functions inherited from SoElement
const SoType getTypeId (void) constint getStackIndex (void) constvirtual void push (SoState *state)virtual void pop (SoState *state, const SoElement *prevTopElement)void setDepth (const int depth)int getDepth (void) constvirtual void print (FILE *file=stdout) constvirtual ~SoElement ()
π«Ά Static Public Member Functions
static SoType getClassTypeId (void)static int getClassStackIndex (void)static void * createInstance (void)static void initClass (void)static void set (SoState *state, int context, SbBool twopasstransparency, SbBool remoterendering)static int get (SoState *state)static int getExtID (const char *str)static void getOpenGLVersion (SoState *state, int &major, int &minor)static SbBool extSupported (SoState *state, int extid)static SbBool areMipMapsFast (SoState *state)static void shouldAutoCache (SoState *state, int bits)static void setAutoCacheBits (SoState *state, int bits)static int resetAutoCacheBits (SoState *state)static SbBool getIsRemoteRendering (SoState *state)static uint32_t getUniqueCacheContext (void)static void scheduleDeleteCallback (const uint32_t contextid, SoScheduleDeleteCB *cb, void *closure)static void incNumShapes (SoState *state)static int getNumShapes (SoState *state)static void incNumSeparators (SoState *state)static int getNumSeparators (SoState *state)
π 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 ~SoGLCacheContextElement ()
π Protected Member Functions inherited from SoElement
SoElement (void)void capture (SoState *const state) constvirtual void captureThis (SoState *state) constvoid setTypeId (const SoType typeId)void setStackIndex (const int index)SoElement * getNextInStack (void) constSoElement * getNextFree (void) const
π«Ά Additional Inherited Members
π 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 SoElement
SoType typeIdint stackIndexint depth
π Static Protected Attributes inherited from SoElement
static int classStackIndexstatic SoTypeList * stackToType
π Detailed Description π
The SoGLCacheContextElement class handles the OpenGL cache for a context. periodt. it said what it said π
π Constructor & Destructor Documentation π
SoGLCacheContextElement::~SoGLCacheContextElement () [protected], [virtual]
Destructor. say bye bestie, it's protected so you're not the one calling it anyway π¦
π Member Function Documentation π
SoType SoGLCacheContextElement::getClassTypeId (void ) [static]
This static method returns the SoType object associated with objects of this class.
int SoGLCacheContextElement::getClassStackIndex (void ) [static]
This static method returns the state stack index for the class.
void * SoGLCacheContextElement::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. πͺβ¨
Creates a new instance of the class type corresponding to the SoType object.
void SoGLCacheContextElement::initClass (void ) [static]
Initialize relevant common data for all instances, like the type system.
void SoGLCacheContextElement::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 SoElement.
SbBool SoGLCacheContextElement::matches (const SoElement * element) const [virtual]
This function returns TRUE is the element matches another element (of the same class), with respect to cache validity.
not me noticing the docs literally say "returns TRUE is the element matches" π we are leaving that exactly as-is because accuracy is the whole point, bestie.
If the application programmer's extension element has a matches() function, it should also have a copyMatchInfo() function.
Implements SoElement.
SoElement * SoGLCacheContextElement::copyMatchInfo (void ) const [virtual]
This function creates a copy of the element that contains enough information to enable the matches() function to work.
Used to help with scene graph traversal caching operations.
Implements SoElement.
void SoGLCacheContextElement::set (SoState * state, int context, SbBool twopasstransparency, SbBool remoterendering) [static]
Sets data for context.
int SoGLCacheContextElement::get (SoState * state) [static]
Returns context id.
Note that the signature on this function is slightly wrong: the function should really return an uint32_t, like SoGLRenderAction::getCacheContext() does. It is kept like this for compatibility reasons. (legacy code really said "I'm not fixing that" and honestly? respect π)
The value returned will always be a positive integer.
int SoGLCacheContextElement::getExtID (const char * str) [static]
Returns an extension id based on the GL extension string. The extension id can be used to quickly test for the availability of an extension later, using extSupported().
void SoGLCacheContextElement::getOpenGLVersion (SoState * state, int & major, int & minor) [static]
Returns the OpenGL version for the current context. This method is an extension versus the Open Inventor API. (Coin said "we're doing our own thing" and did π )
SbBool SoGLCacheContextElement::extSupported (SoState * state, int extid) [static]
Returns TRUE if the extension is supported for the current context. extid must be an id returned from getExtId(). The test result is cached so this method is pretty fast and can be used at runtime. slay, cached, iconic β¨
SbBool SoGLCacheContextElement::areMipMapsFast (SoState * state) [static]
Returns if mipmapped textures are fast for the current context. In Coin, we just return TRUE for the moment. (confident, unbothered, moisturized π
)
void SoGLCacheContextElement::shouldAutoCache (SoState * state, int bits) [static]
Update auto cache bits.
void SoGLCacheContextElement::setAutoCacheBits (SoState * state, int bits) [static]
Sets the auto cache bits.
int SoGLCacheContextElement::resetAutoCacheBits (SoState * state) [static]
Not properly supported yet. > bestie this is literally what it says, don't come for me, come for the upstream docs π
SbBool SoGLCacheContextElement::getIsRemoteRendering (SoState * state) [static]
Returns TRUE if rendering is indirect / remote.
uint32_t SoGLCacheContextElement::getUniqueCacheContext (void ) [static]
Returns an unique cache context id, in the range [1, ->.
If you render the same scene graph into two or different cache contexts, and you've not using display list and texture object sharing among contexts, the cache context id need to be unique for rendering to work.
This function is an extension for Coin, and it is not available in the original SGI Open Inventor v2.1 API.
See also: SoGLRenderAction::setCacheContext()
void SoGLCacheContextElement::scheduleDeleteCallback (const uint32_t contextid, SoScheduleDeleteCB * cb, void * closure) [static]
Can be used to receive a callback the next time Coin knows that the context (specified by contextid) is the current OpenGL context.
This function can be used to free OpenGL resources for a context.
Note that the callback will be invoked only once, and then removed from the internal list of scheduled callbacks. one and done, no double-texting π₯
Since: Coin 2.3
void SoGLCacheContextElement::incNumShapes (SoState * state) [static]
Increment the number of shapes in a open cache.
Since: Coin 3.0
int SoGLCacheContextElement::getNumShapes (SoState * state) [static]
Returns the number of shapes in an open cache.
Since: Coin 3.0
void SoGLCacheContextElement::incNumSeparators (SoState * state) [static]
Increment the number of separators in an open cache.
Since: Coin 3.0
int SoGLCacheContextElement::getNumSeparators (SoState * state) [static]
Returns the number of separators in an open cache.
Since: Coin 3.0
π¦ Author π¦
Generated automatically by Doxygen for Coin from the source code. (yes bestie, a robot wrote this and I just gave it a makeover π«Ά)
Version 4.0.10 Β· Thu Jun 25 2026 00:00:00 β and that's the whole page, you made it to the end, you absolute main character ππ mwah, go render something gorgeous β¨
π¦ where this page comes from
- fedora 43: Coin4-devel 4.0.10-1.fc43 Β· BSD-3-Clause AND GPL-3.0-or-later
- fedora 43: Coin4-devel 4.0.10-1.fc43 Β· BSD-3-Clause AND GPL-3.0-or-later
- fedora 44: Coin4-devel 4.0.10-1.fc44 Β· BSD-3-Clause AND GPL-3.0-or-later
- fedora 44: Coin4-devel 4.0.10-1.fc44 Β· BSD-3-Clause AND GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms