VTK
vtkTextureUnitManager.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkTextureUnitManager.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
29 #ifndef vtkTextureUnitManager_h
30 #define vtkTextureUnitManager_h
31 
32 #include "vtkRenderingOpenGL2Module.h" // For export macro
33 #include "vtkObject.h"
34 
36 
37 class VTKRENDERINGOPENGL2_EXPORT vtkTextureUnitManager : public vtkObject
38 {
39 public:
41 
42  void PrintSelf(ostream& os, vtkIndent indent);
43 
45 
47 
54 
57 
63  virtual int Allocate();
64 
74  virtual int Allocate(int unit);
75 
79  bool IsAllocated(int textureUnitId);
80 
84  virtual void Free(int textureUnitId);
85 
86 protected:
89 
92 
95  void DeleteTable();
96 
97  vtkOpenGLRenderWindow *Context;
98 
99  int NumberOfTextureUnits;
100  bool *TextureUnits;
101 
102 private:
103  vtkTextureUnitManager(const vtkTextureUnitManager&); // Not implemented.
104  void operator=(const vtkTextureUnitManager&); // Not implemented.
105 };
106 
107 #endif
vtkGetObjectMacro
#define vtkGetObjectMacro(name, type)
Definition: vtkSetGet.h:232
vtkTextureUnitManager::Allocate
virtual int Allocate(int unit)
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkTextureUnitManager::Free
virtual void Free(int textureUnitId)
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:62
vtkTextureUnitManager::Allocate
virtual int Allocate()
vtkTextureUnitManager
allocate/free texture units.
Definition: vtkTextureUnitManager.h:38
vtkTextureUnitManager::DeleteTable
void DeleteTable()
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkTextureUnitManager::~vtkTextureUnitManager
~vtkTextureUnitManager()
vtkTextureUnitManager::IsAllocated
bool IsAllocated(int textureUnitId)
vtkTextureUnitManager::New
static vtkTextureUnitManager * New()
vtkObject.h
vtkTextureUnitManager::GetNumberOfTextureUnits
int GetNumberOfTextureUnits()
vtkTextureUnitManager::vtkTextureUnitManager
vtkTextureUnitManager()
vtkOpenGLRenderWindow
OpenGL rendering window.
Definition: vtkOpenGLRenderWindow.h:41
vtkTextureUnitManager::SetContext
void SetContext(vtkOpenGLRenderWindow *context)
vtkTextureUnitManager::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)