OpenSceneGraph  3.4.0
Public Member Functions | Protected Member Functions
osg::BufferTemplate< T > Class Template Reference

Template buffer class to be used with a struct as template parameter. More...

Inheritance diagram for osg::BufferTemplate< T >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 BufferTemplate ()
 BufferTemplate (const BufferTemplate< T > &bt, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
 Copy constructor using CopyOp to manage deep vs shallow copy.
virtual bool isSameKindAs (const Object *obj) const
virtual const char * libraryName () const
 return the name of the object's library.
virtual const char * className () const
 return the name of the object's class type.
virtual ObjectcloneType () const
 Clone the type of an object, with Object* return type.
virtual Objectclone (const CopyOp &copyop) const
 Clone an object, with Object* return type.
virtual const GLvoid * getDataPointer () const
virtual unsigned int getTotalDataSize () const
const T & getData () const
T & getData ()
void setData (const T &data)

Protected Member Functions

virtual ~BufferTemplate ()

Detailed Description

template<typename T>
class osg::BufferTemplate< T >

Template buffer class to be used with a struct as template parameter.

This class is useful to send C++ structures on the GPU (e.g. for uniform blocks) but be careful to the alignments rules on the GPU side !


Constructor & Destructor Documentation

template<typename T>
osg::BufferTemplate< T >::BufferTemplate ( ) [inline]
template<typename T>
osg::BufferTemplate< T >::BufferTemplate ( const BufferTemplate< T > &  bt,
const CopyOp copyop = CopyOp::SHALLOW_COPY 
) [inline]

Copy constructor using CopyOp to manage deep vs shallow copy.

template<typename T>
virtual osg::BufferTemplate< T >::~BufferTemplate ( ) [inline, protected, virtual]

Member Function Documentation

template<typename T>
virtual const char* osg::BufferTemplate< T >::className ( ) const [inline, virtual]

return the name of the object's class type.

Must be defined by derived classes.

Reimplemented from osg::BufferData.

template<typename T>
virtual Object* osg::BufferTemplate< T >::clone ( const CopyOp ) const [inline, virtual]

Clone an object, with Object* return type.

Must be defined by derived classes.

Implements osg::Object.

template<typename T>
virtual Object* osg::BufferTemplate< T >::cloneType ( ) const [inline, virtual]

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

Must be defined by derived classes.

Implements osg::Object.

template<typename T>
const T& osg::BufferTemplate< T >::getData ( ) const [inline]
template<typename T>
T& osg::BufferTemplate< T >::getData ( ) [inline]
template<typename T>
virtual const GLvoid* osg::BufferTemplate< T >::getDataPointer ( ) const [inline, virtual]

Implements osg::BufferData.

template<typename T>
virtual unsigned int osg::BufferTemplate< T >::getTotalDataSize ( ) const [inline, virtual]

Implements osg::BufferData.

template<typename T>
virtual bool osg::BufferTemplate< T >::isSameKindAs ( const Object obj) const [inline, virtual]

Reimplemented from osg::BufferData.

References NULL.

template<typename T>
virtual const char* osg::BufferTemplate< T >::libraryName ( ) const [inline, virtual]

return the name of the object's library.

Must be defined by derived classes. The OpenSceneGraph convention is that the namespace of a library is the same as the library name.

Reimplemented from osg::BufferData.

template<typename T>
void osg::BufferTemplate< T >::setData ( const T &  data) [inline]

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

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