VR-Forces 4.5 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Attributes
makVrv::DtSharedDrawElementsUInt Class Reference

This is a utility class used to allow sharing of index buffers while allowing for unique start and count, and mode parameters for rendering. More...

Inheritance diagram for makVrv::DtSharedDrawElementsUInt:
Inheritance graph
[legend]

Public Member Functions

 DtSharedDrawElementsUInt (GLenum mode, osg::DrawElementsUInt *indices)
 DtSharedDrawElementsUInt (const DtSharedDrawElementsUInt &copy, const osg::CopyOp &copyop)
void setIndexBounds (unsigned int start, unsigned int count)
 Set the index bounds.
void getIndexBounds (unsigned int &start, unsigned int &count) const
virtual osg::Object * cloneType () const
 All of the remaining functions are simply necessary to implement the DrawElements API forwarded to the indices member.
virtual osg::Object * clone (const osg::CopyOp &copyop) const
virtual bool isSameKindAs (const osg::Object *obj) const
virtual const charlibraryName () const
virtual const charclassName () const
virtual const GLvoid * getDataPointer () const
virtual unsigned int getTotalDataSize () const
virtual bool supportsBufferObject () const
virtual osg::DrawElements * getDrawElements ()
virtual const osg::DrawElements * getDrawElements () const
void setNumInstances (int n)
int getNumInstances () const
void setMode (GLenum mode)
GLenum getMode () const
virtual void accept (osg::PrimitiveFunctor &functor) const
virtual void accept (osg::PrimitiveIndexFunctor &functor) const
virtual unsigned int index (unsigned int pos) const
virtual unsigned int getNumIndices () const
virtual void offsetIndices (int offset)
virtual unsigned int getNumPrimitives () const
*virtual void dirty ()
 Dirty the primitive, which increments the modified count, to force buffer objects to update.
void setModifiedCount (unsigned int value)
 Set the modified count value.
unsigned int getModifiedCount () const
 Get modified count value.
virtual void resizeGLObjectBuffers (unsigned int maxSize)
 Resize any per context GLObject buffers to specified size.
virtual void releaseGLObjects (osg::State *state=0) const
 If State is non-zero, this function releases OpenGL objects for the specified graphics context.
virtual void computeRange () const
virtual void draw (osg::State &state, bool useVertexBufferObjects) const
 Draw override.

Protected Attributes

osg::ref_ptr
< osg::DrawElementsUInt > 
myIndices
unsigned int myStartIndex
unsigned int myCount

Detailed Description

This is a utility class used to allow sharing of index buffers while allowing for unique start and count, and mode parameters for rendering.

Constructor & Destructor Documentation

makVrv::DtSharedDrawElementsUInt::DtSharedDrawElementsUInt ( GLenum  mode,
osg::DrawElementsUInt *  indices 
)
makVrv::DtSharedDrawElementsUInt::DtSharedDrawElementsUInt ( const DtSharedDrawElementsUInt copy,
const osg::CopyOp &  copyop 
)

Member Function Documentation

void makVrv::DtSharedDrawElementsUInt::setIndexBounds ( unsigned int  start,
unsigned int  count 
)

Set the index bounds.

This allows for independent start and sizes of elements while still sharing the same buffer.

void makVrv::DtSharedDrawElementsUInt::getIndexBounds ( unsigned int start,
unsigned int count 
) const
virtual osg::Object* makVrv::DtSharedDrawElementsUInt::cloneType ( ) const
inlinevirtual

All of the remaining functions are simply necessary to implement the DrawElements API forwarded to the indices member.

virtual osg::Object* makVrv::DtSharedDrawElementsUInt::clone ( const osg::CopyOp &  copyop) const
inlinevirtual
virtual bool makVrv::DtSharedDrawElementsUInt::isSameKindAs ( const osg::Object *  obj) const
inlinevirtual
virtual const char* makVrv::DtSharedDrawElementsUInt::libraryName ( ) const
inlinevirtual
virtual const char* makVrv::DtSharedDrawElementsUInt::className ( ) const
inlinevirtual
virtual const GLvoid* makVrv::DtSharedDrawElementsUInt::getDataPointer ( ) const
virtual
virtual unsigned int makVrv::DtSharedDrawElementsUInt::getTotalDataSize ( ) const
virtual
virtual bool makVrv::DtSharedDrawElementsUInt::supportsBufferObject ( ) const
virtual
virtual osg::DrawElements* makVrv::DtSharedDrawElementsUInt::getDrawElements ( )
virtual
virtual const osg::DrawElements* makVrv::DtSharedDrawElementsUInt::getDrawElements ( ) const
virtual
void makVrv::DtSharedDrawElementsUInt::setNumInstances ( int  n)
int makVrv::DtSharedDrawElementsUInt::getNumInstances ( ) const
void makVrv::DtSharedDrawElementsUInt::setMode ( GLenum  mode)
GLenum makVrv::DtSharedDrawElementsUInt::getMode ( ) const
virtual void makVrv::DtSharedDrawElementsUInt::accept ( osg::PrimitiveFunctor &  functor) const
virtual
virtual void makVrv::DtSharedDrawElementsUInt::accept ( osg::PrimitiveIndexFunctor &  functor) const
virtual
virtual unsigned int makVrv::DtSharedDrawElementsUInt::index ( unsigned int  pos) const
virtual
virtual unsigned int makVrv::DtSharedDrawElementsUInt::getNumIndices ( ) const
virtual
virtual void makVrv::DtSharedDrawElementsUInt::offsetIndices ( int  offset)
virtual
virtual unsigned int makVrv::DtSharedDrawElementsUInt::getNumPrimitives ( ) const
virtual
* virtual void makVrv::DtSharedDrawElementsUInt::dirty ( )
virtual

Dirty the primitive, which increments the modified count, to force buffer objects to update.

void makVrv::DtSharedDrawElementsUInt::setModifiedCount ( unsigned int  value)
inline

Set the modified count value.

unsigned int makVrv::DtSharedDrawElementsUInt::getModifiedCount ( ) const
inline

Get modified count value.

virtual void makVrv::DtSharedDrawElementsUInt::resizeGLObjectBuffers ( unsigned int  maxSize)
virtual

Resize any per context GLObject buffers to specified size.

virtual void makVrv::DtSharedDrawElementsUInt::releaseGLObjects ( osg::State *  state = 0) const
virtual

If State is non-zero, this function releases OpenGL objects for the specified graphics context.

Otherwise, releases OpenGL objects for all graphics contexts.

virtual void makVrv::DtSharedDrawElementsUInt::computeRange ( ) const
virtual
virtual void makVrv::DtSharedDrawElementsUInt::draw ( osg::State &  state,
bool  useVertexBufferObjects 
) const
virtual

Draw override.

Member Data Documentation

osg::ref_ptr<osg::DrawElementsUInt> makVrv::DtSharedDrawElementsUInt::myIndices
protected
unsigned int makVrv::DtSharedDrawElementsUInt::myStartIndex
protected
unsigned int makVrv::DtSharedDrawElementsUInt::myCount
protected

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

Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (www.mak.com)