VTK  9.5.20251126
vtkWebGPURenderTextureCache.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
13
14#ifndef vtkWebGPURenderTextureCache_h
15#define vtkWebGPURenderTextureCache_h
16
17#include "vtkObject.h"
18
19#include "vtkRenderingWebGPUModule.h" // for export macro
20#include "vtkSmartPointer.h" // for vtkSmartPointer
21#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
22
23#include <memory> // for unique_ptr
24
25VTK_ABI_NAMESPACE_BEGIN
26
30class vtkWindow;
31
32class VTKRENDERINGWEBGPU_EXPORT VTK_MARSHALAUTO vtkWebGPURenderTextureCache : public vtkObject
33{
34public:
37
46 void PrintSelf(ostream& os, vtkIndent indent) override;
47
53
61
68
74 bool RemoveRenderTexture(int index);
75
76protected:
79
80private:
82 void operator=(const vtkWebGPURenderTextureCache&) = delete;
83
84 friend class vtkWebGPUTexture;
85 static constexpr int INVALID_TEXTURE_INDEX = -1;
86 class vtkInternals;
87 std::unique_ptr<vtkInternals> Internals;
88};
89
90VTK_ABI_NAMESPACE_END
91#endif
a simple class to control print indentation
Definition vtkIndent.h:108
Hold a reference to a vtkObjectBase instance.
void PrintSelf(ostream &os, vtkIndent indent) override
PrintSelf outputs the cache contents in the following format: RenderTextureCache: index: pointer inde...
bool RemoveRenderTexture(int index)
Remove a render Texture from the cache.
~vtkWebGPURenderTextureCache() override
int AddRenderTexture(vtkSmartPointer< vtkWebGPURenderTextureDeviceResource > renderTexture)
Add a render Texture to the cache and returns its associated index.
static vtkWebGPURenderTextureCache * New()
vtkSmartPointer< vtkWebGPURenderTextureDeviceResource > GetRenderTexture(int index)
Get a render Texture associated with the given index.
void ReleaseGraphicsResources(vtkWindow *window)
Reset the Texture cache.
WebGPU rendering window.
window superclass for vtkRenderWindow
Definition vtkWindow.h:48
#define VTK_MARSHALAUTO