VTK  9.7.1
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
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 
25 VTK_ABI_NAMESPACE_BEGIN
26 
27 class vtkWebGPURenderer;
30 class vtkWindow;
31 
32 class VTKRENDERINGWEBGPU_EXPORT VTK_MARSHALAUTO vtkWebGPURenderTextureCache : public vtkObject
33 {
34 public:
37 
46  void PrintSelf(ostream& os, vtkIndent indent) override;
47 
52  void ReleaseGraphicsResources(vtkWindow* window);
53 
60  int AddRenderTexture(vtkSmartPointer<vtkWebGPURenderTextureDeviceResource> renderTexture);
61 
68 
74  bool RemoveRenderTexture(int index);
75 
76 protected:
78  ~vtkWebGPURenderTextureCache() override;
79 
80 private:
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 
90 VTK_ABI_NAMESPACE_END
91 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:52
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkWebGPUTexture is a concrete implementation of the abstract class vtkTexture for WebGPU...
Class to create and retrieve render Textures based on a given key.
Hold a reference to a vtkObjectBase instance.
Definition: vtkMeta.h:23
window superclass for vtkRenderWindow
Definition: vtkWindow.h:41
a simple class to control print indentation
Definition: vtkIndent.h:28
#define VTK_MARSHALAUTO
WebGPU rendering window.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...