VTK  9.3.1
vtkOpenGLVertexBufferObjectCache.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
15 #ifndef vtkOpenGLVertexBufferObjectCache_h
16 #define vtkOpenGLVertexBufferObjectCache_h
17 
18 #include "vtkObject.h"
19 #include "vtkRenderingOpenGL2Module.h" // For export macro
20 #include <map> // for methods
21 
22 VTK_ABI_NAMESPACE_BEGIN
24 class vtkDataArray;
25 class vtkTimeStamp;
26 
27 class VTKRENDERINGOPENGL2_EXPORT vtkOpenGLVertexBufferObjectCache : public vtkObject
28 {
29 public:
32  void PrintSelf(ostream& os, vtkIndent indent) override;
33 
41  vtkOpenGLVertexBufferObject* GetVBO(vtkDataArray* array, int destType);
42 
47  void RemoveVBO(vtkOpenGLVertexBufferObject* vbo);
48 
49  typedef std::map<vtkDataArray*, vtkOpenGLVertexBufferObject*> VBOMap;
50 
51 protected:
54 
55  VBOMap MappedVBOs;
56 
57 private:
59  void operator=(const vtkOpenGLVertexBufferObjectCache&) = delete;
60 };
61 
62 VTK_ABI_NAMESPACE_END
63 #endif
std::map< vtkDataArray *, vtkOpenGLVertexBufferObject * > VBOMap
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.
record modification and/or execution time
Definition: vtkTimeStamp.h:24
manage vertex buffer objects shared within a context
a simple class to control print indentation
Definition: vtkIndent.h:28
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:44
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...