VTK  9.5.20250805
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"
10
11VTK_ABI_NAMESPACE_BEGIN
12
13class VTKRENDERINGWEBGPU_EXPORT vtkWebGPUHelpers
14{
15public:
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
30private:
36 static int ComputeTextureFormatToVTKDataType(vtkWebGPUComputeTexture::TextureFormat format);
37};
38
39VTK_ABI_NAMESPACE_END
40
41#endif
42// VTK-HeaderTest-Exclude: vtkWebGPUHelpers.h
Hold a reference to a vtkObjectBase instance.
static void WriteComputeTextureToDisk(const std::string &filepath, vtkSmartPointer< vtkWebGPUComputePass >, int textureIndex, int mipLevel, bool flipY=false)
Writes a certain mip level of a texture from a compute path to a PNG file on the disk.
static std::string StringViewToStdString(wgpu::StringView sv)
TextureFormat
RGBA8_UNORM: Uses RGB + alpha.