VTK  9.4.20241016
vtkOpenGLContextDeviceBufferObjectBuilder.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
3
10#ifndef vtkOpenGLContextDeviceBufferObjectBuilder_h
11#define vtkOpenGLContextDeviceBufferObjectBuilder_h
12
13#include "vtkFloatArray.h"
14#include "vtkNew.h"
15#include "vtkOpenGLHelper.h"
18#include "vtkRenderWindow.h"
19#include "vtkRenderingContextOpenGL2Module.h" // for export macro
21
22#include <cstdint> // for std::uintptr_t
23#include <unordered_map> // for std::unordered_map
24
25VTK_ABI_NAMESPACE_BEGIN
26class VTKRENDERINGCONTEXTOPENGL2_NO_EXPORT vtkOpenGLContextDeviceBufferObjectBuilder
27{
28public:
35 vtkFloatArray* tcoords, std::uintptr_t cacheIdentifier, vtkRenderWindow* renderWindow);
36
40 void Erase(std::uintptr_t cacheIdentifier, vtkRenderWindow* renderWindow);
41
42private:
43 std::unordered_map<std::size_t, vtkSmartPointer<vtkOpenGLVertexBufferObjectGroup>> VBOGroups;
44};
45
46VTK_ABI_NAMESPACE_END
47#endif // vtkOpenGLContextDeviceBufferObjectBuilder_h
abstract superclass for arrays of numeric data
dynamic, self-adjusting array of float
Internal buffer object builder that maintains a cache of VBO groups.
void BuildVBO(vtkOpenGLHelper *cbo, vtkDataArray *positions, vtkUnsignedCharArray *colors, vtkFloatArray *tcoords, std::uintptr_t cacheIdentifier, vtkRenderWindow *renderWindow)
Build vertex buffer objects for these data arrays and add vertex attribute specifications to the vert...
void Erase(std::uintptr_t cacheIdentifier, vtkRenderWindow *renderWindow)
Erase cache entry for given identifier.
create a window for renderers to draw into
dynamic, self-adjusting array of unsigned char