VTK  9.5.20251126
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 "vtkWebGPUTextureDeviceResource.h" // for TextureFormat, TextureDimension, ...
10#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
11
12VTK_ABI_NAMESPACE_BEGIN
13
18class VTKRENDERINGWEBGPU_EXPORT VTK_MARSHALAUTO vtkWebGPUTextureView : public vtkObject
19{
20public:
23
24 void PrintSelf(ostream& os, vtkIndent indent) override;
25
43
64
66
69 vtkGetMacro(BaseMipLevel, int);
70 vtkSetMacro(BaseMipLevel, int);
72
74
78 vtkGetMacro(MipLevelCount, int);
79 vtkSetMacro(MipLevelCount, int);
81
83
86 vtkGetMacro(Group, vtkIdType);
87 vtkSetMacro(Group, vtkIdType);
89
91
94 vtkGetMacro(Binding, vtkIdType);
95 vtkSetMacro(Binding, vtkIdType);
97
99
105
107
113
115
121
123
129
131
135 vtkGetMacro(Label, std::string&);
136 vtkSetMacro(Label, std::string);
138
139protected:
142
143private:
145 void operator=(const vtkWebGPUTextureView&) = delete;
146
147 // Mip level of the base texture that this texture view gives a view on
148 int BaseMipLevel = 0;
149 // How many mip levels this texture view give the shader access to
150 int MipLevelCount = 1;
151
152 // Bind group of the texture view
153 vtkIdType Group = -1;
154
155 // Binding of the texture view
156 vtkIdType Binding = -1;
157
158 // What aspect of the texture is going to be sampled by the samplers in the shaders sampling this
159 // texture
161
162 // Dimension of the texture view
165
166 // Format of the texture view
169
170 // Mode of the texture view
172
173 // Label used for debugging if something goes wrong
174 std::string Label = "Texture view";
175};
176
177VTK_ABI_NAMESPACE_END
178
179#endif
a simple class to control print indentation
Definition vtkIndent.h:108
TextureDimension
How the texture data is arranged.
TextureFormat
RGBA8_UNORM: Uses RGB + alpha.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkWebGPUTextureView * New()
~vtkWebGPUTextureView() override
TextureViewAspect
What will the shader sample from the texture when calling a sampling function.
TextureViewMode
The mode of the texture view to define what operations will be doable on the texture in the shader.
int vtkIdType
Definition vtkType.h:367
#define VTK_MARSHALAUTO