vtkTextureUnitManager Class Reference

#include <vtkTextureUnitManager.h>

Inheritance diagram for vtkTextureUnitManager:

Inheritance graph
[legend]
Collaboration diagram for vtkTextureUnitManager:

Collaboration graph
[legend]

List of all members.


Detailed Description

allocate/free texture units.

vtkTextureUnitManager is a central place used by shaders to reserve a texture unit ( Allocate() ) or release it ( Free() ).

Don't create a vtkTextureUnitManager, query it from the vtkOpenGLRenderWindow

See also:
vtkOpenGLRenderWindow

Definition at line 36 of file vtkTextureUnitManager.h.


Public Types

typedef vtkObject Superclass

Public Member Functions

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)
int GetNumberOfTextureUnits ()
virtual int Allocate ()
bool IsAllocated (int textureUnitId)
virtual void Free (int textureUnitId)
void SetContext (vtkOpenGLRenderWindow *context)
virtual vtkOpenGLRenderWindowGetContext ()

Static Public Member Functions

static int IsTypeOf (const char *type)
static vtkTextureUnitManagerSafeDownCast (vtkObject *o)
static vtkTextureUnitManagerNew ()

Protected Member Functions

 vtkTextureUnitManager ()
 ~vtkTextureUnitManager ()
void DeleteTable ()

Protected Attributes

vtkOpenGLRenderWindowContext
int NumberOfTextureUnits
bool * TextureUnits

Member Typedef Documentation

Reimplemented from vtkObject.

Definition at line 39 of file vtkTextureUnitManager.h.


Constructor & Destructor Documentation

vtkTextureUnitManager::vtkTextureUnitManager (  )  [protected]

Default constructor.

vtkTextureUnitManager::~vtkTextureUnitManager (  )  [protected]

Destructor.


Member Function Documentation

virtual const char* vtkTextureUnitManager::GetClassName (  )  [virtual]

Reimplemented from vtkObject.

static int vtkTextureUnitManager::IsTypeOf ( const char *  name  )  [static]

Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkObject.

virtual int vtkTextureUnitManager::IsA ( const char *  name  )  [virtual]

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkObject.

static vtkTextureUnitManager* vtkTextureUnitManager::SafeDownCast ( vtkObject o  )  [static]

Reimplemented from vtkObject.

void vtkTextureUnitManager::PrintSelf ( ostream &  os,
vtkIndent  indent 
) [virtual]

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkObject.

static vtkTextureUnitManager* vtkTextureUnitManager::New (  )  [static]

Create an object with Debug turned off, modified time initialized to zero, and reference counting on.

Reimplemented from vtkObject.

void vtkTextureUnitManager::SetContext ( vtkOpenGLRenderWindow context  ) 

Get/Set the context. This does not increase the reference count of the context to avoid reference loops. SetContext() may raise an error is the OpenGL context does not support the required OpenGL extensions.

virtual vtkOpenGLRenderWindow* vtkTextureUnitManager::GetContext (  )  [virtual]

Get/Set the context. This does not increase the reference count of the context to avoid reference loops. SetContext() may raise an error is the OpenGL context does not support the required OpenGL extensions.

int vtkTextureUnitManager::GetNumberOfTextureUnits (  ) 

Number of texture units supported by the OpenGL context.

virtual int vtkTextureUnitManager::Allocate (  )  [virtual]

Reserve a texture unit. It returns its number. It returns -1 if the allocation failed (because there is no more texture unit left).

Postcondition:
valid_result: result==-1 || result>=0 && result<this->GetNumberOfTextureUnits())

allocated: result==-1 || this->IsAllocated(result)

bool vtkTextureUnitManager::IsAllocated ( int  textureUnitId  ) 

Tell if texture unit `textureUnitId' is already allocated.

Precondition:
valid_textureUnitId_range : textureUnitId>=0 && textureUnitId<this->GetNumberOfTextureUnits()

virtual void vtkTextureUnitManager::Free ( int  textureUnitId  )  [virtual]

Release a texture unit.

Precondition:
valid_textureUnitId: textureUnitId>=0 && textureUnitId<this->GetNumberOfTextureUnits()

allocated_textureUnitId: this->IsAllocated(textureUnitId)

void vtkTextureUnitManager::DeleteTable (  )  [protected]

Delete the allocation table and check if it is not called before all the texture units have been released.


Member Data Documentation

Definition at line 85 of file vtkTextureUnitManager.h.

Definition at line 87 of file vtkTextureUnitManager.h.

Definition at line 88 of file vtkTextureUnitManager.h.


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

Generated on Wed Aug 24 12:13:13 2011 for VTK by  doxygen 1.5.6