13#ifndef SO_GLVERTEX_ATTRIBUTE_ELEMENT_H
14#define SO_GLVERTEX_ATTRIBUTE_ELEMENT_H
20#include <Inventor/elements/SoAccumulatedElement.h>
21#include <Inventor/SoLists.h>
22#include <Inventor/misc/SoVBO.h>
66class SoGLRenderAction;
71 typedef SoAccumulatedElement inherited;
79 void init(SoState *state)
override;
85 static void clear(SoState *state, SoNode *node);
91 void push(SoState *state)
override;
#define INVENTOR_SHADER_API
Define class export specifier.
Open Inventor element storing a list of shader parameter nodes.
static void initClass()
Initialize class with runtime type system.
AttributeList _attributes
List of vertex attributes.
static const AttributeList & get(SoState *state)
Returns the current list of vertex attributes from the state.
void init(SoState *state) override
Initialize element.
static void add(SoState *state, SoVertexAttributeInfo *info)
Add vertex attribute info to the list (replacing an info with the same name).
std::vector< SoVertexAttributeInfo * > AttributeList
void push(SoState *state) override
Overrides push() method to copy values from next instance in the stack.
static void enableVertexAttributesCB(SoNode *shape, SoGLRenderAction *action, bool useVbo, uint32_t numVertices)
static void disableVertexAttributesCB(SoNode *shape, SoGLRenderAction *action, bool useVbo, uint32_t numVertices)
static void clear(SoState *state, SoNode *node)
Clear list.
Open Inventor element storing a list of vertex attributes.
bool _perInstance
set if data should be used for instanced rendering
SbString _name
the name of the attribute
uint32_t _numBytes
the number of bytes in _data
bool _shouldFlipRGBAOnLittleEndian
indicates the 4ub data should be flipped
SoNode * _node
the node that holds the attribute
const void * _data
a pointer to the data (not owned by this object)
bool _normalized
a flag if the attribute should be normalized by GL
uint32_t _numValues
the number of values in _data
GLint _index
the index of the attribute in the current shader program, only becomes valid while attribute is enabl...
SoVBO _vbo
a VBO to manage the data
int _numComponents
the number of components for GL
GLenum _type
the GL data type to use for sending