SoVertexShader(3)

๐Ÿ“ฆ version 2.5.0, in fedora 43, fedora 44

๐Ÿ’– 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 ๐Ÿซถ

  • SoShaderObject
  • SoShaderProgram

๐ŸŒธ 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 โ€” with SO_NODE_INIT_CLASS and SO_NODE_CONSTRUCTOR for node classes
  • Inventor/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