virtual unsigned int getMember() const { return _textureUnit; }
protected:
virtual ~TextureAttribute() {}
// called when the TextureAttribute is assigned to a StateSet;
virtual void setTextureUnit(unsigned int unit)
{
if (unit!=_textureUnit)
{
_textureUnit = unit;
// configure the uniform names to reflect new texture unit value
configureUniformNames();
}
}
// TextureAttribute subclasses that manage uniforms will need to override configureUniformNames() and adjust uniform names to reflect texture unit that the attribute is assigned to.