Equalizer 1.0

eq::util::ObjectManager< T > Class Template Reference

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

#include <objectManager.h>

Inheritance diagram for eq::util::ObjectManager< T >:
Collaboration diagram for eq::util::ObjectManager< T >:

List of all members.

Classes

struct  Object
struct  SharedData

Public Member Functions

 ObjectManager (const GLEWContext *const glewContext)
 Construct a new object manager.
 ObjectManager (ObjectManager *shared)
 Construct a new object manager sharing data with another manager.
bool isShared () const
void deleteAll ()
GLuint getList (const T &key) const
GLuint newList (const T &key, const GLsizei num=1)
GLuint obtainList (const T &key, const GLsizei num=1)
void deleteList (const T &key)
GLuint getTexture (const T &key) const
GLuint newTexture (const T &key)
GLuint obtainTexture (const T &key)
void deleteTexture (const T &key)
bool supportsBuffers () const
GLuint getBuffer (const T &key) const
GLuint newBuffer (const T &key)
GLuint obtainBuffer (const T &key)
void deleteBuffer (const T &key)
bool supportsPrograms () const
GLuint getProgram (const T &key) const
GLuint newProgram (const T &key)
GLuint obtainProgram (const T &key)
void deleteProgram (const T &key)
bool supportsShaders () const
GLuint getShader (const T &key) const
GLuint newShader (const T &key, const GLenum type)
GLuint obtainShader (const T &key, const GLenum type)
void deleteShader (const T &key)
AccumgetEqAccum (const T &key) const
AccumnewEqAccum (const T &key)
AccumobtainEqAccum (const T &key)
void deleteEqAccum (const T &key)
GPUCompressor * getEqUploader (const T &key) const
GPUCompressor * newEqUploader (const T &key)
GPUCompressor * obtainEqUploader (const T &key)
void deleteEqUploader (const T &key)
bool supportsEqTexture () const
TexturegetEqTexture (const T &key) const
TexturenewEqTexture (const T &key, const GLenum target)
TextureobtainEqTexture (const T &key, const GLenum 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)
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

Public Types

enum  { INVALID = 0 }

Detailed Description

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

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:

  • supportsObject: Check if the necessary OpenGL version or extension is present
  • getObject: Lookup an existing object, may return 0
  • newObject: Allocate new object, returns false if key exists
  • obtainObject: Lookup or allocate an object for the given key
  • deleteObject: Delete the object of the given key and all associated OpenGL data
See also:
http://www.equalizergraphics.com/documents/design/objectManager.html

Definition at line 56 of file objectManager.h.


Constructor & Destructor Documentation

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

Construct a new object manager.

Definition at line 39 of file objectManager.ipp.

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

Construct a new object manager sharing data with another manager.

Definition at line 46 of file objectManager.ipp.


Member Function Documentation

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

Definition at line 73 of file objectManager.h.


The documentation for this class was generated from the following files:
Generated on Sun May 8 2011 19:11:10 for Equalizer 1.0 by  doxygen 1.7.3