SoVertexShader(3)
๐ SoVertexShader(3) ๐
okay so bestie, welcome to the SoVertexShader(3) glow-up. this is the Coin3D vertex shader node and it is giving main character energy in your scene graph. buckle up, we're doing the whole thing, no skips, no shortcuts. ๐
โจ NAME โจ
SoVertexShader โ the class you use for setting up vertex shader programs. that's it, that's the vibe. ๐
๐ฆ SYNOPSIS ๐ฆ
#include <Inventor/nodes/SoVertexShader.h>
Inherits SoShaderObject.
๐ธ Public Member Functions ๐ธ
virtual SoType getTypeId (void) const
SoVertexShader (void)
virtual ~SoVertexShader ()
๐ Public Member Functions inherited from SoShaderObject ๐
virtual void GLRender (SoGLRenderAction *action)
virtual void search (SoSearchAction *action)
void updateParameters (SoState *state)
SourceType getSourceType (void) const
SbString getSourceProgram (void) const
๐ซถ Public Member Functions inherited from SoNode ๐ซถ
void setOverride (const SbBool state)
SbBool isOverride (void) const
void setNodeType (const NodeType type)
NodeType getNodeType (void) const
virtual SoNode * copy (SbBool copyconnections=0) const
virtual SbBool affectsState (void) const
virtual void doAction (SoAction *action)
virtual void GLRenderBelowPath (SoGLRenderAction *action)
virtual void GLRenderInPath (SoGLRenderAction *action)
virtual void GLRenderOffPath (SoGLRenderAction *action)
virtual void callback (SoCallbackAction *action)
virtual void getBoundingBox (SoGetBoundingBoxAction *action)
virtual void getMatrix (SoGetMatrixAction *action)
virtual void handleEvent (SoHandleEventAction *action)
virtual void pick (SoPickAction *action)
virtual void rayPick (SoRayPickAction *action)
virtual void write (SoWriteAction *action)
virtual void audioRender (SoAudioRenderAction *action)
virtual void getPrimitiveCount (SoGetPrimitiveCountAction *action)
virtual void grabEventsSetup (void)
virtual void grabEventsCleanup (void)
virtual void startNotify (void)
virtual void notify (SoNotList *l)
uint32_t getNodeId (void) const
virtual SoChildList * getChildren (void) const
virtual void writeInstance (SoOutput *out)
virtual SoNode * addToCopyDict (void) const
virtual void copyContents (const SoFieldContainer *from, SbBool
copyconnections)
virtual SoFieldContainer * copyThroughConnection (void) const
๐ Public Member Functions inherited from SoFieldContainer ๐
void setToDefaults (void)
SbBool hasDefaultValues (void) const
SbBool fieldsAreEqual (const SoFieldContainer *container) const
void copyFieldValues (const SoFieldContainer *container, SbBool
copyconnections=0)
SbBool set (const char *const fielddata)
void get (SbString &fielddata)
virtual int getFields (SoFieldList &l) const
virtual int getAllFields (SoFieldList &l) const
virtual SoField * getField (const SbName &name) const
virtual SoField * getEventIn (const SbName &name) const
virtual SoField * getEventOut (const SbName &name) const
SbBool getFieldName (const SoField *const field, SbName &name) const
SbBool enableNotify (const SbBool flag)
SbBool isNotifyEnabled (void) const
SbBool set (const char *fielddata, SoInput *in)
void get (SbString &fielddata, SoOutput *out)
virtual SbBool validateNewFieldValue (SoField *field, void *newval)
virtual void addWriteReference (SoOutput *out, SbBool isfromfield=0)
SbBool getIsBuiltIn (void) const
void setUserData (void *userdata) const
void * getUserData (void) const
โญ Public Member Functions inherited from SoBase โญ
void ref (void) const
void unref (void) const
void unrefNoDelete (void) const
int32_t getRefCount (void) const
void touch (void)
SbBool isOfType (SoType type) const
virtual SbName getName (void) const
virtual void setName (const SbName &newname)
void addAuditor (void *const auditor, const SoNotRec::Type type)
void removeAuditor (void *const auditor, const SoNotRec::Type type)
const SoAuditorList & getAuditors (void) const
SbBool shouldWrite (void)
void assertAlive (void) const
๐ซ Static Public Member Functions ๐ซ
static SoType getClassTypeId (void)
static void initClass (void)
static SbBool isSupported (SourceType sourceType)
๐ง Static Public Member Functions inherited from SoShaderObject ๐ง
static SoType getClassTypeId (void)
static void initClass (void)
๐ Static Public Member Functions inherited from SoNode ๐
static uint32_t getCompatibilityTypes (const SoType &nodetype)
static SoType getClassTypeId (void)
static SoNode * getByName (const SbName &name)
static int getByName (const SbName &name, SoNodeList &l)
static void initClass (void)
static void initClasses (void)
static uint32_t getNextNodeId (void)
static int getActionMethodIndex (const SoType type)
static void getBoundingBoxS (SoAction *action, SoNode *node)
static void GLRenderS (SoAction *action, SoNode *node)
static void callbackS (SoAction *action, SoNode *node)
static void getMatrixS (SoAction *action, SoNode *node)
static void handleEventS (SoAction *action, SoNode *node)
static void pickS (SoAction *action, SoNode *node)
static void rayPickS (SoAction *action, SoNode *node)
static void searchS (SoAction *action, SoNode *node)
static void writeS (SoAction *action, SoNode *node)
static void audioRenderS (SoAction *action, SoNode *node)
static void getPrimitiveCountS (SoAction *action, SoNode *node)
๐ Static Public Member Functions inherited from SoFieldContainer ๐
static void initClass (void)
static SoType getClassTypeId (void)
static void initCopyDict (void)
static void addCopy (const SoFieldContainer *orig, const
SoFieldContainer *copy)
static SoFieldContainer * checkCopy (const SoFieldContainer *orig)
static SoFieldContainer * findCopy (const SoFieldContainer *orig, const
SbBool copyconnections)
static void copyDone (void)
๐ Static Public Member Functions inherited from SoBase ๐
static void initClass (void)
static SoType getClassTypeId (void)
static void addName (SoBase *const base, const char *const name)
static void removeName (SoBase *const base, const char *const name)
static void incrementCurrentWriteCounter (void)
static void decrementCurrentWriteCounter (void)
static SoBase * getNamedBase (const SbName &name, SoType type)
static int getNamedBases (const SbName &name, SoBaseList &baselist,
SoType type)
static SbBool read (SoInput *in, SoBase *&base, SoType expectedtype)
static void setInstancePrefix (const SbString &c)
static void setTraceRefs (SbBool trace)
static SbBool getTraceRefs (void)
static SbBool connectRoute (SoInput *in, const SbName &fromnodename,
const SbName &fromfieldname, const SbName &tonodename, const SbName
&tofieldname)
static SbBool readRoute (SoInput *in)
๐ก๏ธ Protected Member Functions ๐ก๏ธ
virtual const SoFieldData * getFieldData (void) const
๐ธ Protected Member Functions inherited from SoShaderObject ๐ธ
SoShaderObject (void)
virtual ~SoShaderObject ()
virtual SbBool readInstance (SoInput *in, unsigned short flags)
๐ฆ Protected Member Functions inherited from SoNode ๐ฆ
SoNode (void)
virtual ~SoNode ()
๐ Protected Member Functions inherited from SoFieldContainer ๐
SoFieldContainer (void)
~SoFieldContainer ()
๐ซถ Protected Member Functions inherited from SoBase ๐ซถ
SoBase (void)
virtual ~SoBase ()
virtual void destroy (void)
SbBool hasMultipleWriteRefs (void) const
SbBool writeHeader (SoOutput *out, SbBool isgroup, SbBool isengine)
const
void writeFooter (SoOutput *out) const
virtual const char * getFileFormatName (void) const
๐ฎ Static Protected Member Functions ๐ฎ
static const SoFieldData ** getFieldDataPtr (void)
๐ Static Protected Member Functions inherited from SoShaderObject ๐
static const SoFieldData ** getFieldDataPtr (void)
โญ Static Protected Member Functions inherited from SoNode โญ
static const SoFieldData ** getFieldDataPtr (void)
static void setNextActionMethodIndex (int index)
static int getNextActionMethodIndex (void)
static void incNextActionMethodIndex (void)
static void setCompatibilityTypes (const SoType &nodetype, const
uint32_t bitmask)
๐ง Static Protected Member Functions inherited from SoBase ๐ง
static uint32_t getCurrentWriteCounter (void)
static void staticDataLock (void)
static void staticDataUnlock (void)
๐ Additional Inherited Members ๐
๐ Public Types inherited from SoShaderObject ๐
enum SourceType { ARB_PROGRAM, CG_PROGRAM, GLSL_PROGRAM, FILENAME }
๐ซ Public Types inherited from SoNode ๐ซ
enum NodeType { INVENTOR = 0x0000, VRML1 = 0x0001, VRML2 = 0x0002,
INVENTOR_1 = 0x0004, INVENTOR_2_0 = 0x0008, INVENTOR_2_1 = 0x0010,
INVENTOR_2_5 = 0x0020, INVENTOR_2_6 = 0x0040, COIN_1_0 = 0x0080,
COIN_2_0 = 0x0100, EXTENSION = 0x0200, COIN_2_2 = 0x0400, COIN_2_3 =
0x0800, COIN_2_4 = 0x1000, INVENTOR_5_0 = 0x2000, COIN_2_5 = 0x4000
}
๐ Public Attributes inherited from SoShaderObject ๐
SoSFBool isActive
SoSFEnum sourceType
SoSFString sourceProgram
SoMFNode parameter
๐ Protected Types inherited from SoBase ๐
enum BaseFlags { IS_ENGINE = 0x01, IS_GROUP = 0x02 }
๐ธ Protected Attributes inherited from SoNode ๐ธ
uint32_t uniqueId
๐ฆ Protected Attributes inherited from SoFieldContainer ๐ฆ
SbBool isBuiltIn
๐ Static Protected Attributes inherited from SoNode ๐
static uint32_t nextUniqueId = 0
static int nextActionMethodIndex = 0
๐ฅ Detailed Description ๐ฅ
okay so. the SoVertexShader class is used for setting up vertex shader programs. that's the whole assignment, and it ate. ๐
if you want the full tea on how to set up a scene graph with shaders, go read Shaders in Coin โ it's right there for you.
๐ FILE FORMAT/DEFAULTS ๐
VertexShader {
isActive TRUE
sourceType FILENAME
sourceProgram ""
parameter []
}
๐ซถ See also ๐ซถ
SoShaderObjectSoShaderProgram
๐ธ Since ๐ธ
Coin 2.5. yeah bestie, this one's been iconic for a minute. โจ
๐ Constructor & Destructor Documentation ๐
โญ SoVertexShader::SoVertexShader (void )
Constructor. the birth of a legend, fr fr. ๐ฆ
References SoVertexShader().
Referenced by getFieldData(), and SoVertexShader().
โญ SoVertexShader::~SoVertexShader () [virtual]
Destructor. it's the end of an era but the refs live on. ๐ญ
๐ Member Function Documentation ๐
SoType SoVertexShader::getTypeId (void ) const [virtual]
okay bestie, this one is literally the "who dis??" check for any object that inherits from SoBase. It hands you back the type identification of the object, and it's what makes run-time type checking and "downward" casting possible. No cap, it's the backbone of Coin's whole type system. ๐ซถ
Usage example, straight up:
void foo(SoNode * node)
{
if (node->getTypeId() == SoFile::getClassTypeId()) {
SoFile * filenode = (SoFile *)node; // safe downward cast, knows the type
}
else if (node->getTypeId().isOfType(SoGroup::getClassTypeId())) {
SoGroup * group = (SoGroup *)node; // safe downward cast, knows the type
}
}
Now for my application programmers who wanna extend the library with new nodes, engines, nodekits, draggers or whatever else โ listen up, because this is important: this method needs to be overridden in all subclasses. Periodt. It's typically done as part of setting up the full type system for extension classes, which is usually accomplished by using the pre-defined macros available through, for instance:
Inventor/nodes/SoSubNode.hโ withSO_NODE_INIT_CLASSandSO_NODE_CONSTRUCTORfor node classesInventor/engines/SoSubEngine.hโ for engine classes- and so on ๐
For more info on writing Coin extensions, go look at the class documentation of the toplevel superclasses for the various class groups. iykyk.
Reimplemented from SoShaderObject.
const SoFieldData * SoVertexShader::getFieldData (void ) const [protected], [virtual]
This one returns a pointer to the class-wide field data storage object for this instance. That's it, that's the whole vibe. ๐
And if there are no fields present? It returns NULL. Simple as.
Reimplemented from SoShaderObject.
References SoVertexShader().
SbBool SoVertexShader::isSupported (SourceType sourceType) [static]
Returns a boolean indicating whether the requested source type is supported by the OpenGL driver or not. Slay, a yes-or-no answer. โจ
โ ๏ธ Beware: to get a correct answer, a valid OpenGL context must be available. No context, no truth. Don't come for me when it lies to you. ๐ญ
References SoShaderObject::ARB_PROGRAM, SoShaderObject::CG_PROGRAM, SoShaderObject::GLSL_PROGRAM, and SoShaderObject::sourceType.
๐ Author
Generated automatically by Doxygen for Coin from the source code.
and that's a wrap, bestie!! this whole page came from Coin, Version 2.5.0, and it's serving SoVertexShader(3) energy from start to finish. go off, read your shaders, and stay iconic ๐๐ฆ๐ธ
๐ฆ where this page comes from
- fedora 43: Coin2-devel 2.5.0-52.fc43 ยท GPL-2.0-only
- fedora 43: Coin2-devel 2.5.0-52.fc43 ยท GPL-2.0-only
- fedora 44: Coin2-devel 2.5.0-54.fc44 ยท GPL-2.0-only
- fedora 44: Coin2-devel 2.5.0-54.fc44 ยท GPL-2.0-only
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms