Equalizer  1.6.1
Classes | Public Types | Public Member Functions | List of all members
eq::util::ObjectManager< class > Class Template Reference

A facility class to manage OpenGL objects across shared contexts. More...

#include <objectManager.h>

+ Inheritance diagram for eq::util::ObjectManager< class >:
+ Collaboration diagram for eq::util::ObjectManager< class >:

Public Types

enum  { INVALID = 0 }
 

Public Member Functions

 ObjectManager (const GLEWContext *const glewContext)
 Construct a new object manager. More...
 
 ObjectManager (ObjectManager *shared)
 Construct a new object manager sharing data with another manager. More...
 
bool isShared () const
 
void deleteAll ()
 Delete all managed objects and associated GL objects. More...
 
unsigned getList (const T &key) const
 
unsigned newList (const T &key, const int num=1)
 
unsigned obtainList (const T &key, const int num=1)
 
void deleteList (const T &key)
 
unsigned getTexture (const T &key) const
 
unsigned newTexture (const T &key)
 
unsigned obtainTexture (const T &key)
 
void deleteTexture (const T &key)
 
bool supportsBuffers () const
 
unsigned getBuffer (const T &key) const
 
unsigned newBuffer (const T &key)
 
unsigned obtainBuffer (const T &key)
 
void deleteBuffer (const T &key)
 
bool supportsPrograms () const
 
unsigned getProgram (const T &key) const
 
unsigned newProgram (const T &key)
 
unsigned obtainProgram (const T &key)
 
void deleteProgram (const T &key)
 
bool supportsShaders () const
 
unsigned getShader (const T &key) const
 
unsigned newShader (const T &key, const unsigned type)
 
unsigned obtainShader (const T &key, const unsigned type)
 
void deleteShader (const T &key)
 
AccumgetEqAccum (const T &key) const
 
AccumnewEqAccum (const T &key)
 
AccumobtainEqAccum (const T &key)
 
void deleteEqAccum (const T &key)
 
lunchbox::Uploader * getEqUploader (const T &key) const
 
lunchbox::Uploader * newEqUploader (const T &key)
 
lunchbox::Uploader * obtainEqUploader (const T &key)
 
void deleteEqUploader (const T &key)
 
bool supportsEqTexture () const
 
TexturegetEqTexture (const T &key) const
 
TexturenewEqTexture (const T &key, const unsigned target)
 
TextureobtainEqTexture (const T &key, const unsigned target)
 
void deleteEqTexture (const T &key)
 
bool supportsEqFrameBufferObject () const
 
FrameBufferObjectgetEqFrameBufferObject (const T &key) const
 
FrameBufferObjectnewEqFrameBufferObject (const T &key)
 
FrameBufferObjectobtainEqFrameBufferObject (const T &key)
 
void deleteEqFrameBufferObject (const T &key)
 
bool supportsEqPixelBufferObject () const
 
PixelBufferObjectgetEqPixelBufferObject (const T &key) const
 
PixelBufferObjectnewEqPixelBufferObject (const T &key, const bool threadSafe)
 
PixelBufferObjectobtainEqPixelBufferObject (const T &key, const bool threadSafe)
 
void deleteEqPixelBufferObject (const T &key)
 
util::BitmapFont< T > * getEqBitmapFont (const T &key) const
 
util::BitmapFont< T > * newEqBitmapFont (const T &key)
 
util::BitmapFont< T > * obtainEqBitmapFont (const T &key)
 
void deleteEqBitmapFont (const T &key)
 
const GLEWContext * glewGetContext () const
 

Detailed Description

template<class>
class eq::util::ObjectManager< class >

A facility class to manage OpenGL objects across shared contexts.

The object manager implements object sharing in the same way as OpenGL. During creation, a shared object manager may be given, causing the two (or more) object managers to allocate objects from the same namespace. The last object manager will delete all data allocated on the host. OpenGL objects have to be explictly deleted using deleteAll() to ensure an OpenGL context is still current during destruction.

For each type of OpenGL object supported the following methods are available:

See Also
http://www.equalizergraphics.com/documents/design/objectManager.html

Definition at line 217 of file eq/client/types.h.

Constructor & Destructor Documentation

template<class >
eq::util::ObjectManager< class >::ObjectManager ( const GLEWContext *const  glewContext)

Construct a new object manager.

template<class >
eq::util::ObjectManager< class >::ObjectManager ( ObjectManager< class > *  shared)

Construct a new object manager sharing data with another manager.

Member Function Documentation

template<class >
void eq::util::ObjectManager< class >::deleteAll ( )

Delete all managed objects and associated GL objects.

Requires current GL context.

Referenced by eqAsync::AsyncFetcher::run().

+ Here is the caller graph for this function:

template<class >
bool eq::util::ObjectManager< class >::isShared ( ) const
inline
Returns
true if more than one OM is using the same data.

Definition at line 75 of file objectManager.h.


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