14 #ifndef OSG_ArrayDispatchers
15 #define OSG_ArrayDispatchers 1
17 #include <osg/ref_ptr>
19 #include <osg/Matrixd>
25 class AttributeDispatchMap;
29 virtual void assign(
const GLvoid*) {}
50 if (at) _activeDispatchList[binding].push_back(at);
69 void dispatch(
unsigned int binding,
unsigned int index)
72 for(AttributeDispatchList::iterator itr = ad.begin();
80 bool active(
unsigned int binding)
const {
return !_activeDispatchList[binding].empty(); }
86 void assignTexCoordDispatchers(
unsigned int unit);
87 void assignVertexAttribDispatchers(
unsigned int unit);
bool getUseVertexAttribAlias() const
std::vector< AttributeDispatchList > ActiveDispatchList
AttributeDispatchMap * _colorDispatchers
ActiveDispatchList _activeDispatchList
AttributeDispatchMap * _vertexDispatchers
void setUseVertexAttribAlias(bool flag)
void dispatch(unsigned int binding, unsigned int index)
std::vector< AttributeDispatch * > AttributeDispatchList
void activateColorArray(osg::Array *array)
void activate(unsigned int binding, AttributeDispatch *at)
AttributeDispatchMapList _vertexAttribDispatchers
AttributeDispatchMap * _normalDispatchers
void activateNormalArray(osg::Array *array)
std::vector< AttributeDispatchMap * > AttributeDispatchMapList
virtual void operator()(unsigned int)
void activateVertexAttribArray(unsigned int unit, osg::Array *array)
Binding getBinding() const
AttributeDispatchMapList _texCoordDispatchers
void activateVertexArray(osg::Array *array)
bool _useVertexAttribAlias
void activateFogCoordArray(osg::Array *array)
AttributeDispatchMap * _secondaryColorDispatchers
void activateTexCoordArray(unsigned int unit, osg::Array *array)
AttributeDispatchMap * _fogCoordDispatchers
virtual void assign(const GLvoid *)
void activateSecondaryColorArray(osg::Array *array)
bool active(unsigned int binding) const