OSG  3.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Member Functions | List of all members
osg::BufferTemplate< T > Class Template Reference

#include <BufferTemplate.h>

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

Public Member Functions

 BufferTemplate ()
 
 BufferTemplate (const BufferTemplate< T > &bt, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
 
virtual bool isSameKindAs (const Object *obj) const
 
virtual const char * libraryName () const
 
virtual const char * className () const
 
virtual ObjectcloneType () const
 
virtual Objectclone (const CopyOp &copyop) const
 
virtual const GLvoid * getDataPointer () const
 
virtual unsigned int getTotalDataSize () const
 
const T & getData () const
 
T & getData ()
 
void setData (const T &data)
 
- Public Member Functions inherited from osg::BufferData
 BufferData ()
 
 BufferData (const BufferData &bd, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
 
virtual osg::ArrayasArray ()
 
virtual const osg::ArrayasArray () const
 
virtual osg::PrimitiveSetasPrimitiveSet ()
 
virtual const osg::PrimitiveSetasPrimitiveSet () const
 
virtual osg::ImageasImage ()
 
virtual const osg::ImageasImage () const
 
void setBufferObject (BufferObject *bufferObject)
 
BufferObjectgetBufferObject ()
 
const BufferObjectgetBufferObject () const
 
void setBufferIndex (unsigned int index)
 
unsigned int getBufferIndex () const
 
GLBufferObjectgetGLBufferObject (unsigned int contextID) const
 
GLBufferObjectgetOrCreateGLBufferObject (unsigned int contextID) const
 
void setModifiedCallback (ModifiedCallback *md)
 
ModifiedCallbackgetModifiedCallback ()
 
const ModifiedCallbackgetModifiedCallback () const
 
void dirty ()
 
void setModifiedCount (unsigned int value)
 
unsigned int getModifiedCount () const
 
virtual void resizeGLObjectBuffers (unsigned int maxSize)
 
void releaseGLObjects (State *state=0) const
 
unsigned int getNumClients () const
 
void addClient (osg::Object *)
 
void removeClient (osg::Object *)
 
- Public Member Functions inherited from osg::Object
 Object ()
 
 Object (bool threadSafeRefUnref)
 
 Object (const Object &, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
 
std::string getCompoundClassName () const
 
virtual NodeasNode ()
 
virtual const NodeasNode () const
 
virtual NodeVisitorasNodeVisitor ()
 
virtual const NodeVisitorasNodeVisitor () const
 
virtual StateAttributeasStateAttribute ()
 
virtual const StateAttributeasStateAttribute () const
 
virtual UniformasUniform ()
 
virtual const UniformasUniform () const
 
virtual void setThreadSafeRefUnref (bool threadSafe)
 
virtual void setName (const std::string &name)
 
void setName (const char *name)
 
const std::string & getName () const
 
void setDataVariance (DataVariance dv)
 
DataVariance getDataVariance () const
 
virtual void computeDataVariance ()
 
void setUserDataContainer (osg::UserDataContainer *udc)
 
osg::UserDataContainergetUserDataContainer ()
 
const osg::UserDataContainergetUserDataContainer () const
 
osg::UserDataContainergetOrCreateUserDataContainer ()
 
virtual void setUserData (Referenced *obj)
 
virtual ReferencedgetUserData ()
 
virtual const ReferencedgetUserData () const
 
template<typename T >
bool getUserValue (const std::string &name, T &value) const
 
template<typename T >
void setUserValue (const std::string &name, const T &value)
 
template<typename T >
BoolValueObject
UCharValueObject
UShortValueObject
UIntValueObject
DoubleValueObject
Vec3fValueObject
Vec2dValueObject
Vec4dValueObject
PlaneValueObject
MatrixdValueObject
BoundingBoxdValueObject
BoundingSpheredValueObject
bool 
getUserValue (const std::string &name, T &value) const
 
- Public Member Functions inherited from osg::Referenced
 Referenced ()
 
 Referenced (bool threadSafeRefUnref)
 
 Referenced (const Referenced &)
 
Referencedoperator= (const Referenced &)
 
bool getThreadSafeRefUnref () const
 
OpenThreads::MutexgetRefMutex () const
 
int ref () const
 
int unref () const
 
int unref_nodelete () const
 
int referenceCount () const
 
ObserverSetgetObserverSet () const
 
ObserverSetgetOrCreateObserverSet () const
 
void addObserver (Observer *observer) const
 
void removeObserver (Observer *observer) const
 

Protected Member Functions

virtual ~BufferTemplate ()
 
- Protected Member Functions inherited from osg::BufferData
virtual ~BufferData ()
 
- Protected Member Functions inherited from osg::Object
virtual ~Object ()
 
- Protected Member Functions inherited from osg::Referenced
virtual ~Referenced ()
 
void signalObserversAndDelete (bool signalDelete, bool doDelete) const
 
void deleteUsingDeleteHandler () const
 

Additional Inherited Members

- Public Types inherited from osg::Object
enum  DataVariance { DYNAMIC, STATIC, UNSPECIFIED }
 
- Static Public Member Functions inherited from osg::Referenced
static OpenThreads::MutexgetGlobalReferencedMutex ()
 
static void setThreadSafeReferenceCounting (bool enableThreadSafeReferenceCounting)
 
static bool getThreadSafeReferenceCounting ()
 
static void setDeleteHandler (DeleteHandler *handler)
 
static DeleteHandlergetDeleteHandler ()
 
- Protected Attributes inherited from osg::BufferData
unsigned int _modifiedCount
 
unsigned int _bufferIndex
 
osg::ref_ptr< BufferObject_bufferObject
 
osg::ref_ptr< ModifiedCallback_modifiedCallback
 
unsigned int _numClients
 
- Protected Attributes inherited from osg::Object
std::string _name
 
DataVariance _dataVariance
 
osg::UserDataContainer_userDataContainer
 
- Protected Attributes inherited from osg::Referenced
OpenThreads::AtomicPtr _observerSet
 
OpenThreads::Atomic _refCount
 

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 !

Definition at line 29 of file BufferTemplate.h.

Constructor & Destructor Documentation

template<typename T>
osg::BufferTemplate< T >::BufferTemplate ( )
inline

Definition at line 32 of file BufferTemplate.h.

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.

Definition at line 38 of file BufferTemplate.h.

template<typename T>
virtual osg::BufferTemplate< T >::~BufferTemplate ( )
inlineprotectedvirtual

Definition at line 58 of file BufferTemplate.h.

Member Function Documentation

template<typename T>
virtual const char* osg::BufferTemplate< T >::className ( ) const
inlinevirtual

return the name of the object's class type. Must be defined by derived classes.

Reimplemented from osg::BufferData.

Definition at line 45 of file BufferTemplate.h.

template<typename T>
virtual Object* osg::BufferTemplate< T >::clone ( const CopyOp ) const
inlinevirtual

Clone an object, with Object* return type. Must be defined by derived classes.

Implements osg::Object.

Definition at line 48 of file BufferTemplate.h.

template<typename T>
virtual Object* osg::BufferTemplate< T >::cloneType ( ) const
inlinevirtual

Clone the type of an object, with Object* return type. Must be defined by derived classes.

Implements osg::Object.

Definition at line 47 of file BufferTemplate.h.

template<typename T>
const T& osg::BufferTemplate< T >::getData ( ) const
inline

Definition at line 53 of file BufferTemplate.h.

template<typename T>
T& osg::BufferTemplate< T >::getData ( )
inline

Definition at line 54 of file BufferTemplate.h.

template<typename T>
virtual const GLvoid* osg::BufferTemplate< T >::getDataPointer ( ) const
inlinevirtual

Implements osg::BufferData.

Definition at line 50 of file BufferTemplate.h.

template<typename T>
virtual unsigned int osg::BufferTemplate< T >::getTotalDataSize ( ) const
inlinevirtual

Implements osg::BufferData.

Definition at line 51 of file BufferTemplate.h.

template<typename T>
virtual bool osg::BufferTemplate< T >::isSameKindAs ( const Object obj) const
inlinevirtual

Reimplemented from osg::BufferData.

Definition at line 43 of file BufferTemplate.h.

template<typename T>
virtual const char* osg::BufferTemplate< T >::libraryName ( ) const
inlinevirtual

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.

Definition at line 44 of file BufferTemplate.h.

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

Definition at line 55 of file BufferTemplate.h.

Here is the call graph for this function:


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