.TH "SoGLCacheContextElement" 3 "Tue Dec 26 2023 17:59:22" "Version 4.0.2" "Coin" \" -*- nroff -*- .ad l .nh .SH NAME SoGLCacheContextElement \- The \fBSoGLCacheContextElement\fP class handles the OpenGL cache for a context\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBSoElement\fP\&. .SS "Public Types" .in +1c .ti -1c .RI "enum { \fBDO_AUTO_CACHE\fP = 1, \fBDONT_AUTO_CACHE\fP }" .br .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBvirtual\fP \fBvoid\fP \fBinit\fP (\fBSoState\fP *state)" .br .ti -1c .RI "\fBvirtual\fP SbBool \fBmatches\fP (\fBconst\fP \fBSoElement\fP *\fBelt\fP) \fBconst\fP" .br .ti -1c .RI "\fBvirtual\fP \fBSoElement\fP * \fBcopyMatchInfo\fP (\fBvoid\fP) \fBconst\fP" .br .in -1c Public Member Functions inherited from \fBSoElement\fP .in +1c .ti -1c .RI "\fBconst\fP \fBSoType\fP \fBgetTypeId\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "int \fBgetStackIndex\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBvirtual\fP \fBvoid\fP \fBpush\fP (\fBSoState\fP *state)" .br .ti -1c .RI "\fBvirtual\fP \fBvoid\fP \fBpop\fP (\fBSoState\fP *state, \fBconst\fP \fBSoElement\fP *\fBprevTopElement\fP)" .br .ti -1c .RI "\fBvoid\fP \fBsetDepth\fP (\fBconst\fP int \fBdepth\fP)" .br .ti -1c .RI "int \fBgetDepth\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBvirtual\fP \fBvoid\fP \fBprint\fP (\fBFILE\fP *\fBfile\fP=\fBstdout\fP) \fBconst\fP" .br .ti -1c .RI "\fBvirtual\fP \fB~SoElement\fP ()" .br .in -1c .SS "Static Public Member Functions" .in +1c .ti -1c .RI "\fBstatic\fP \fBSoType\fP \fBgetClassTypeId\fP (\fBvoid\fP)" .br .ti -1c .RI "\fBstatic\fP int \fBgetClassStackIndex\fP (\fBvoid\fP)" .br .ti -1c .RI "\fBstatic\fP \fBvoid\fP * \fBcreateInstance\fP (\fBvoid\fP)" .br .ti -1c .RI "\fBstatic\fP \fBvoid\fP \fBinitClass\fP (\fBvoid\fP)" .br .ti -1c .RI "\fBstatic\fP \fBvoid\fP \fBset\fP (\fBSoState\fP *state, int context, SbBool \fBtwopasstransparency\fP, SbBool \fBremoterendering\fP)" .br .ti -1c .RI "\fBstatic\fP int \fBget\fP (\fBSoState\fP *state)" .br .ti -1c .RI "\fBstatic\fP int \fBgetExtID\fP (\fBconst\fP char *str)" .br .ti -1c .RI "\fBstatic\fP \fBvoid\fP \fBgetOpenGLVersion\fP (\fBSoState\fP *state, int &\fBmajor\fP, int &\fBminor\fP)" .br .ti -1c .RI "\fBstatic\fP SbBool \fBextSupported\fP (\fBSoState\fP *state, int \fBextid\fP)" .br .ti -1c .RI "\fBstatic\fP SbBool \fBareMipMapsFast\fP (\fBSoState\fP *state)" .br .ti -1c .RI "\fBstatic\fP \fBvoid\fP \fBshouldAutoCache\fP (\fBSoState\fP *state, int \fBbits\fP)" .br .ti -1c .RI "\fBstatic\fP \fBvoid\fP \fBsetAutoCacheBits\fP (\fBSoState\fP *state, int \fBbits\fP)" .br .ti -1c .RI "\fBstatic\fP int \fBresetAutoCacheBits\fP (\fBSoState\fP *state)" .br .ti -1c .RI "\fBstatic\fP SbBool \fBgetIsRemoteRendering\fP (\fBSoState\fP *state)" .br .ti -1c .RI "\fBstatic\fP uint32_t \fBgetUniqueCacheContext\fP (\fBvoid\fP)" .br .ti -1c .RI "\fBstatic\fP \fBvoid\fP \fBscheduleDeleteCallback\fP (\fBconst\fP uint32_t contextid, SoScheduleDeleteCB *cb, \fBvoid\fP *closure)" .br .ti -1c .RI "\fBstatic\fP \fBvoid\fP \fBincNumShapes\fP (\fBSoState\fP *state)" .br .ti -1c .RI "\fBstatic\fP int \fBgetNumShapes\fP (\fBSoState\fP *state)" .br .ti -1c .RI "\fBstatic\fP \fBvoid\fP \fBincNumSeparators\fP (\fBSoState\fP *state)" .br .ti -1c .RI "\fBstatic\fP int \fBgetNumSeparators\fP (\fBSoState\fP *state)" .br .in -1c Static Public Member Functions inherited from \fBSoElement\fP .in +1c .ti -1c .RI "\fBstatic\fP \fBvoid\fP \fBinitClass\fP (\fBvoid\fP)" .br .ti -1c .RI "\fBstatic\fP \fBSoType\fP \fBgetClassTypeId\fP (\fBvoid\fP)" .br .ti -1c .RI "\fBstatic\fP int \fBgetClassStackIndex\fP (\fBvoid\fP)" .br .ti -1c .RI "\fBstatic\fP \fBvoid\fP \fBinitElements\fP (\fBvoid\fP)" .br .ti -1c .RI "\fBstatic\fP int \fBgetNumStackIndices\fP (\fBvoid\fP)" .br .ti -1c .RI "\fBstatic\fP \fBSoType\fP \fBgetIdFromStackIndex\fP (\fBconst\fP int \fBstackIndex\fP)" .br .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "\fBvirtual\fP \fB~SoGLCacheContextElement\fP ()" .br .in -1c Protected Member Functions inherited from \fBSoElement\fP .in +1c .ti -1c .RI "\fBSoElement\fP (\fBvoid\fP)" .br .ti -1c .RI "\fBvoid\fP \fBcapture\fP (\fBSoState\fP *\fBconst\fP state) \fBconst\fP" .br .ti -1c .RI "\fBvirtual\fP \fBvoid\fP \fBcaptureThis\fP (\fBSoState\fP *state) \fBconst\fP" .br .ti -1c .RI "\fBvoid\fP \fBsetTypeId\fP (\fBconst\fP \fBSoType\fP \fBtypeId\fP)" .br .ti -1c .RI "\fBvoid\fP \fBsetStackIndex\fP (\fBconst\fP int index)" .br .ti -1c .RI "\fBSoElement\fP * \fBgetNextInStack\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBSoElement\fP * \fBgetNextFree\fP (\fBvoid\fP) \fBconst\fP" .br .in -1c .SS "Additional Inherited Members" Static Protected Member Functions inherited from \fBSoElement\fP .in +1c .ti -1c .RI "\fBstatic\fP \fBSoElement\fP * \fBgetElement\fP (\fBSoState\fP *\fBconst\fP state, \fBconst\fP int \fBstackIndex\fP)" .br .ti -1c .RI "\fBstatic\fP \fBconst\fP \fBSoElement\fP * \fBgetConstElement\fP (\fBSoState\fP *\fBconst\fP state, \fBconst\fP int \fBstackIndex\fP)" .br .ti -1c .RI "\fBstatic\fP int \fBcreateStackIndex\fP (\fBconst\fP \fBSoType\fP id)" .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 "\fBstatic\fP int \fBclassStackIndex\fP" .br .ti -1c .RI "\fBstatic\fP \fBSoTypeList\fP * \fBstackToType\fP" .br .in -1c .SH "Detailed Description" .PP The \fBSoGLCacheContextElement\fP class handles the OpenGL cache for a context\&. .SH "Constructor & Destructor Documentation" .PP .SS "SoGLCacheContextElement::~SoGLCacheContextElement ()\fC [protected]\fP, \fC [virtual]\fP" Destructor\&. .SH "Member Function Documentation" .PP .SS "\fBSoType\fP SoGLCacheContextElement::getClassTypeId (\fBvoid\fP)\fC [static]\fP" This static method returns the \fBSoType\fP object associated with objects of this class\&. .br .SS "int SoGLCacheContextElement::getClassStackIndex (\fBvoid\fP)\fC [static]\fP" This static method returns the state stack index for the class\&. .br .SS "\fBvoid\fP * SoGLCacheContextElement::createInstance (\fBvoid\fP)\fC [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\&. .br .SS "\fBvoid\fP SoGLCacheContextElement::initClass (\fBvoid\fP)\fC [static]\fP" Initialize relevant common data for all instances, like the type system\&. .SS "\fBvoid\fP SoGLCacheContextElement::init (\fBSoState\fP * state)\fC [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 \fBSoElement\fP\&. .SS "SbBool SoGLCacheContextElement::matches (\fBconst\fP \fBSoElement\fP * element) const\fC [virtual]\fP" This function returns \fCTRUE\fP is the element matches another element (of the same class), with respect to cache validity\&. .PP If the application programmer's extension element has a \fBmatches()\fP function, it should also have a \fBcopyMatchInfo()\fP function\&. .PP Implements \fBSoElement\fP\&. .SS "\fBSoElement\fP * SoGLCacheContextElement::copyMatchInfo (\fBvoid\fP) const\fC [virtual]\fP" This function creates a copy of the element that contains enough information to enable the \fBmatches()\fP function to work\&. .PP Used to help with scene graph traversal caching operations\&. .PP Implements \fBSoElement\fP\&. .SS "\fBvoid\fP SoGLCacheContextElement::set (\fBSoState\fP * state, int context, SbBool twopasstransparency, SbBool remoterendering)\fC [static]\fP" Sets data for context\&. .SS "int SoGLCacheContextElement::get (\fBSoState\fP * state)\fC [static]\fP" Returns context id\&. .PP Note that the signature on this function is slightly wrong: the function should really return an \fCuint32_t\fP, like \fBSoGLRenderAction::getCacheContext()\fP does\&. It is kept like this for compatibility reasons\&. .PP The value returned will always be a positive integer\&. .SS "int SoGLCacheContextElement::getExtID (\fBconst\fP char * str)\fC [static]\fP" 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 \fBextSupported()\fP\&. .SS "\fBvoid\fP SoGLCacheContextElement::getOpenGLVersion (\fBSoState\fP * state, int & major, int & minor)\fC [static]\fP" Returns the OpenGL version for the current context\&. This method is an extension versus the Open Inventor API\&. .SS "SbBool SoGLCacheContextElement::extSupported (\fBSoState\fP * state, int extid)\fC [static]\fP" Returns TRUE if the extension is supported for the current context\&. \fIextid\fP must be an id returned from getExtId()\&. The test result is cached so this method is pretty fast and can be used at runtime\&. .SS "SbBool SoGLCacheContextElement::areMipMapsFast (\fBSoState\fP * state)\fC [static]\fP" Returns if mipmapped textures are fast for the current context\&. In Coin, we just return TRUE for the moment\&. .SS "\fBvoid\fP SoGLCacheContextElement::shouldAutoCache (\fBSoState\fP * state, int bits)\fC [static]\fP" Update auto cache bits\&. .SS "\fBvoid\fP SoGLCacheContextElement::setAutoCacheBits (\fBSoState\fP * state, int bits)\fC [static]\fP" Sets the auto cache bits\&. .SS "int SoGLCacheContextElement::resetAutoCacheBits (\fBSoState\fP * state)\fC [static]\fP" Not properly supported yet\&. .SS "SbBool SoGLCacheContextElement::getIsRemoteRendering (\fBSoState\fP * state)\fC [static]\fP" Returns \fCTRUE\fP if rendering is indirect / remote\&. .SS "uint32_t SoGLCacheContextElement::getUniqueCacheContext (\fBvoid\fP)\fC [static]\fP" Returns an unique cache context id, in the range [1, ->\&. .PP 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\&. .PP This function is an extension for Coin, and it is not available in the original SGI Open Inventor \fBv2\&.1\fP API\&. .br .PP \fBSee also\fP .RS 4 \fBSoGLRenderAction::setCacheContext()\fP .RE .PP .SS "\fBvoid\fP SoGLCacheContextElement::scheduleDeleteCallback (\fBconst\fP uint32_t contextid, SoScheduleDeleteCB * cb, \fBvoid\fP * closure)\fC [static]\fP" Can be used to receive a callback the next time Coin knows that the context (specified by \fIcontextid\fP) is the current OpenGL context\&. .PP This function can be used to free OpenGL resources for a context\&. .PP Note that the callback will be invoked only once, and then removed from the internal list of scheduled callbacks\&. .PP \fBSince\fP .RS 4 Coin \fB2\&.3\fP .RE .PP .SS "\fBvoid\fP SoGLCacheContextElement::incNumShapes (\fBSoState\fP * state)\fC [static]\fP" Increment the number of shapes in a open cache\&. .PP \fBSince\fP .RS 4 Coin \fB3\&.0\fP .RE .PP .SS "int SoGLCacheContextElement::getNumShapes (\fBSoState\fP * state)\fC [static]\fP" Returns the number of shapes in an open cache\&. .PP \fBSince\fP .RS 4 Coin \fB3\&.0\fP .RE .PP .SS "\fBvoid\fP SoGLCacheContextElement::incNumSeparators (\fBSoState\fP * state)\fC [static]\fP" Increment the number of separators in an open cache\&. .PP \fBSince\fP .RS 4 Coin \fB3\&.0\fP .RE .PP .SS "int SoGLCacheContextElement::getNumSeparators (\fBSoState\fP * state)\fC [static]\fP" Returns the number of separators in an open cache\&. .PP \fBSince\fP .RS 4 Coin \fB3\&.0\fP .RE .PP .SH "Author" .PP Generated automatically by Doxygen for Coin from the source code\&.