VTK  9.7.1
vtkWebGPUTextureInternals.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 vtkWebGPUTextureInternals_h
5 #define vtkWebGPUTextureInternals_h
6 
7 #include "vtkDataArray.h"
8 #include "vtkRenderingWebGPUModule.h"
10 #include "vtk_wgpu.h"
11 
12 VTK_ABI_NAMESPACE_BEGIN
13 
14 class VTKRENDERINGWEBGPU_NO_EXPORT vtkWebGPUTextureInternals
15 {
16 public:
21  static void Upload(vtkSmartPointer<vtkWebGPUConfiguration> wgpuConfiguration,
22  wgpu::Texture texture, std::uint32_t bytesPerRow, std::uint32_t byteSize, const void* data,
23  const char* description = nullptr);
24 
29  static void UploadFromDataArray(vtkSmartPointer<vtkWebGPUConfiguration> wgpuConfiguration,
30  wgpu::Texture texture, std::uint32_t bytesPerRow, vtkDataArray* dataArray,
31  const char* description = nullptr);
32 
36  static wgpu::TexelCopyTextureInfo GetTexelCopyTextureInfo(
37  wgpu::Texture texture, wgpu::Origin3D origin = { 0, 0, 0 }, std::uint32_t mipLevel = 0);
38 
43  static wgpu::TexelCopyBufferLayout GetDataLayout(
44  wgpu::Texture texture, std::uint32_t bytesPerRow, std::uint32_t srcOffset = 0);
45 };
46 
47 VTK_ABI_NAMESPACE_END
48 
49 #endif
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:44