VTK  9.3.20240919
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
28private:
34 static int ComputeTextureFormatToVTKDataType(vtkWebGPUComputeTexture::TextureFormat format);
35};
36
37VTK_ABI_NAMESPACE_END
38
39#endif
40// 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.
TextureFormat
RGBA8_UNORM: Uses RGB + alpha.