VTK  9.3.1
vtkTextureUnitManager.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
18 #ifndef vtkTextureUnitManager_h
19 #define vtkTextureUnitManager_h
20 
21 #include "vtkObject.h"
22 #include "vtkRenderingOpenGL2Module.h" // For export macro
23 
24 VTK_ABI_NAMESPACE_BEGIN
26 
27 class VTKRENDERINGOPENGL2_EXPORT vtkTextureUnitManager : public vtkObject
28 {
29 public:
31 
32  void PrintSelf(ostream& os, vtkIndent indent) override;
33 
34  static vtkTextureUnitManager* New();
35 
39  void Initialize();
40 
44  int GetNumberOfTextureUnits();
45 
53  virtual int Allocate();
54 
66  virtual int Allocate(int unit);
67 
73  bool IsAllocated(int textureUnitId);
74 
80  virtual void Free(int textureUnitId);
81 
82 protected:
87 
91  ~vtkTextureUnitManager() override;
92 
97  void DeleteTable();
98 
101 
102 private:
104  void operator=(const vtkTextureUnitManager&) = delete;
105 };
106 
107 VTK_ABI_NAMESPACE_END
108 #endif
OpenGL rendering window.
abstract base class for most VTK objects
Definition: vtkObject.h:51
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
Definition: vtkIndent.h:28
allocate/free texture units.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...