18 #ifndef vtkOpenGLArrayTextureBufferCache_h
19 #define vtkOpenGLArrayTextureBufferCache_h
23 #include "vtkRenderingOpenGL2Module.h"
33 VTK_ABI_NAMESPACE_BEGIN
60 std::uint64_t LastAccess = 0;
70 std::shared_ptr<Entry> GetTextureBuffer(
71 vtkDataArray* array,
bool scalarComponents,
bool integerTexture);
85 unsigned long GetCPUMemorySize()
const;
95 vtkSetMacro(MaximumCacheSize, std::size_t);
96 vtkGetMacro(MaximumCacheSize, std::size_t);
104 std::size_t GetCurrentCacheSize()
const;
119 void RemoveUnusedTextureBuffers(
vtkWindow* window);
132 void ReleaseGraphicsResources(
vtkWindow* window);
140 static std::size_t GetEntrySize(
const Entry& entry);
145 static bool EntryIsPinned(
const Entry& entry);
148 static void ReleaseEntry(Entry& entry,
vtkWindow* window);
150 using Key = std::tuple<vtkDataArray*, bool, bool>;
151 std::map<Key, std::shared_ptr<Entry>>
Cache;
153 std::size_t MaximumCacheSize = 256 * 1024 * 1024;
155 std::uint64_t AccessCounter = 0;
162 VTK_ABI_NAMESPACE_END
abstract base class for most VTK objects
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkTypeUInt32 vtkMTimeType
vtkSmartPointer< vtkTextureObject > Texture
vtkSmartPointer< vtkOpenGLBufferObject > Buffer
window superclass for vtkRenderWindow
manage texture-buffer-backed data arrays shared within a context
a simple class to control print indentation
vtkSmartPointer< vtkDataArray > Array
abstract superclass for arrays of numeric data
std::size_t GetNumberOfCachedTextureBuffers() const
Return the number of distinct (array, role) texture buffers currently cached.
A cached texture buffer for one (array, role).
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
std::map< Key, std::shared_ptr< Entry > > Cache
std::tuple< vtkDataArray *, bool, bool > Key