VTK  9.4.2
vtkWebGPUTextureView.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
4#ifndef vtkWebGPUTextureView_h
5#define vtkWebGPUTextureView_h
6
7#include "vtkObject.h"
8#include "vtkRenderingWebGPUModule.h" // For export macro
9#include "vtkWebGPUTexture.h" // for TextureFormat, TextureDimension, ...
10
11VTK_ABI_NAMESPACE_BEGIN
12
17class VTKRENDERINGWEBGPU_EXPORT vtkWebGPUTextureView : public vtkObject
18{
19public:
22
23 void PrintSelf(ostream& os, vtkIndent indent) override;
24
37 {
38 ASPECT_ALL = 0,
40 ASPECT_STENCIL
41 };
42
56 {
57 UNDEFINED = 0,
61 READ_WRITE_STORAGE
62 };
63
65
68 vtkGetMacro(BaseMipLevel, int);
69 vtkSetMacro(BaseMipLevel, int);
71
73
77 vtkGetMacro(MipLevelCount, int);
78 vtkSetMacro(MipLevelCount, int);
80
82
85 vtkGetMacro(Group, vtkIdType);
86 vtkSetMacro(Group, vtkIdType);
88
90
93 vtkGetMacro(Binding, vtkIdType);
94 vtkSetMacro(Binding, vtkIdType);
96
98
104
106
109 vtkGetMacro(Dimension, vtkWebGPUTexture::TextureDimension);
110 vtkSetMacro(Dimension, vtkWebGPUTexture::TextureDimension);
112
114
120
122
128
130
134 vtkGetMacro(Label, std::string&);
135 vtkSetMacro(Label, std::string);
137
138protected:
142 void operator=(const vtkWebGPUTextureView&) = delete;
143
144private:
145 // Mip level of the base texture that this texture view gives a view on
146 int BaseMipLevel = 0;
147 // How many mip levels this texture view give the shader access to
148 int MipLevelCount = 1;
149
150 // Bind group of the texture view
151 vtkIdType Group = -1;
152
153 // Binding of the texture view
154 vtkIdType Binding = -1;
155
156 // What aspect of the texture is going to be sampled by the samplers in the shaders sampling this
157 // texture
158 vtkWebGPUTextureView::TextureViewAspect Aspect = TextureViewAspect::ASPECT_ALL;
159
160 // Dimension of the texture view
162
163 // Format of the texture view
165
166 // Mode of the texture view
168
169 // Label used for debugging if something goes wrong
170 std::string Label = "Texture view";
171};
172
173VTK_ABI_NAMESPACE_END
174
175#endif
a simple class to control print indentation
Definition vtkIndent.h:108
abstract base class for most VTK objects
Definition vtkObject.h:162
Abstraction class for WebGPU texture views.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkWebGPUTextureView * New()
~vtkWebGPUTextureView() override
void operator=(const vtkWebGPUTextureView &)=delete
TextureViewAspect
What will the shader sample from the texture when calling a sampling function.
vtkWebGPUTextureView(const vtkWebGPUTextureView &)=delete
TextureViewMode
The mode of the texture view to define what operations will be doable on the texture in the shader.
TextureDimension
How the texture data is arranged.
TextureFormat
RGBA8_UNORM: Uses RGB + alpha.
int vtkIdType
Definition vtkType.h:315