VTK  9.7.1
vtkWebGPUHelpers.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 vtkWebGPUHelpers_h
5 #define vtkWebGPUHelpers_h
6 
7 #include "vtkRenderingWebGPUModule.h"
8 #include "vtkWebGPUComputePass.h"
10 
11 VTK_ABI_NAMESPACE_BEGIN
12 
13 class VTKRENDERINGWEBGPU_EXPORT vtkWebGPUHelpers
14 {
15 public:
25  static void WriteComputeTextureToDisk(const std::string& filepath,
26  vtkSmartPointer<vtkWebGPUComputePass>, int textureIndex, int mipLevel, bool flipY = false);
27 
28  static std::string StringViewToStdString(wgpu::StringView sv);
29 
30 private:
36  static int ComputeTextureFormatToVTKDataType(vtkWebGPUComputeTexture::TextureFormat format);
37 };
38 
39 VTK_ABI_NAMESPACE_END
40 
41 #endif
42 // VTK-HeaderTest-Exclude: vtkWebGPUHelpers.h
TextureFormat
RGBA8_UNORM: Uses RGB + alpha.