OpenSceneGraph  3.4.0
Public Member Functions | Protected Member Functions | Protected Attributes
osg::VertexAttribDivisor Class Reference

VertexAttribDivisor state class which encapsulates OpenGL glVertexAttribDivisor() functionality. More...

Inheritance diagram for osg::VertexAttribDivisor:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 VertexAttribDivisor ()
 VertexAttribDivisor (unsigned int index, unsigned int divisor)
 VertexAttribDivisor (const VertexAttribDivisor &vad, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
 Copy constructor using CopyOp to manage deep vs shallow copy.
virtual osg::ObjectcloneType () const
 Clone the type of an attribute, with Object* return type.
virtual osg::Objectclone (const osg::CopyOp &copyop) const
 Clone an attribute, with Object* return type.
virtual bool isSameKindAs (const osg::Object *obj) const
 Return true if this and obj are of the same kind of object.
virtual const char * libraryName () const
 Return the name of the attribute's library.
virtual const char * className () const
 Return the name of the attribute's class type.
virtual Type getType () const
 Return the Type identifier of the attribute's class type.
virtual int compare (const StateAttribute &sa) const
 Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.
virtual unsigned int getMember () const
 Return the member identifier within the attribute's class type.
void setIndex (unsigned int index)
 Set the vertex attrib index - the vertex attribute slot that the divisor should apply to.
unsigned int getIndex () const
 Get the vertex attrib index.
void setDivisor (unsigned int divisor)
 Set the vertex attrib divisor.
unsigned int getDivisor () const
 Get the vertex attrib divisor.
virtual void apply (State &state) const
 Apply to the OpenGL state machine.

Protected Member Functions

virtual ~VertexAttribDivisor ()

Protected Attributes

unsigned int _index
unsigned int _divisor

Detailed Description

VertexAttribDivisor state class which encapsulates OpenGL glVertexAttribDivisor() functionality.


Constructor & Destructor Documentation

osg::VertexAttribDivisor::VertexAttribDivisor ( unsigned int  index,
unsigned int  divisor 
)

Copy constructor using CopyOp to manage deep vs shallow copy.

virtual osg::VertexAttribDivisor::~VertexAttribDivisor ( ) [protected, virtual]

Member Function Documentation

virtual void osg::VertexAttribDivisor::apply ( State state) const [virtual]

Apply to the OpenGL state machine.

Reimplemented from osg::StateAttribute.

virtual const char* osg::VertexAttribDivisor::className ( ) const [inline, virtual]

Return the name of the attribute's class type.

Reimplemented from osg::StateAttribute.

virtual osg::Object* osg::VertexAttribDivisor::clone ( const osg::CopyOp ) const [inline, virtual]

Clone an attribute, with Object* return type.

Must be defined by derived classes.

Implements osg::StateAttribute.

virtual osg::Object* osg::VertexAttribDivisor::cloneType ( ) const [inline, virtual]

Clone the type of an attribute, with Object* return type.

Must be defined by derived classes.

Implements osg::StateAttribute.

virtual int osg::VertexAttribDivisor::compare ( const StateAttribute sa) const [inline, virtual]

Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs.

Implements osg::StateAttribute.

References COMPARE_StateAttribute_Parameter, and COMPARE_StateAttribute_Types.

unsigned int osg::VertexAttribDivisor::getDivisor ( ) const [inline]

Get the vertex attrib divisor.

unsigned int osg::VertexAttribDivisor::getIndex ( ) const [inline]

Get the vertex attrib index.

virtual unsigned int osg::VertexAttribDivisor::getMember ( ) const [inline, virtual]

Return the member identifier within the attribute's class type.

Used for light number/clip plane number etc.

Reimplemented from osg::StateAttribute.

virtual Type osg::VertexAttribDivisor::getType ( ) const [inline, virtual]

Return the Type identifier of the attribute's class type.

Implements osg::StateAttribute.

virtual bool osg::VertexAttribDivisor::isSameKindAs ( const osg::Object obj) const [inline, virtual]

Return true if this and obj are of the same kind of object.

Reimplemented from osg::StateAttribute.

References NULL.

virtual const char* osg::VertexAttribDivisor::libraryName ( ) const [inline, virtual]

Return the name of the attribute's library.

Reimplemented from osg::StateAttribute.

void osg::VertexAttribDivisor::setDivisor ( unsigned int  divisor) [inline]

Set the vertex attrib divisor.

void osg::VertexAttribDivisor::setIndex ( unsigned int  index) [inline]

Set the vertex attrib index - the vertex attribute slot that the divisor should apply to.


Member Data Documentation

unsigned int osg::VertexAttribDivisor::_divisor [protected]
unsigned int osg::VertexAttribDivisor::_index [protected]

The documentation for this class was generated from the following file:

osg logo
Generated at Tue Dec 8 2015 00:16:45 for the OpenSceneGraph by doxygen 1.7.6.1.