VTK  9.5.20251213
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
12VTK_ABI_NAMESPACE_BEGIN
13
14class VTKRENDERINGWEBGPU_NO_EXPORT vtkWebGPUTextureInternals
15{
16public:
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
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
47VTK_ABI_NAMESPACE_END
48
49#endif
Hold a reference to a vtkObjectBase instance.
static wgpu::TexelCopyTextureInfo GetTexelCopyTextureInfo(wgpu::Texture texture, wgpu::Origin3D origin={ 0, 0, 0 }, std::uint32_t mipLevel=0)
Get the image copy texture from the given texture for use in uploading data to the texture.
static void Upload(vtkSmartPointer< vtkWebGPUConfiguration > wgpuConfiguration, wgpu::Texture texture, std::uint32_t bytesPerRow, std::uint32_t byteSize, const void *data, const char *description=nullptr)
Upload byteSize of data from the data pointer to the given texture using the given device and assumin...
static wgpu::TexelCopyBufferLayout GetDataLayout(wgpu::Texture texture, std::uint32_t bytesPerRow, std::uint32_t srcOffset=0)
Get the texture data layout from the given texture and bytes per row for use in uploading data to the...
static void UploadFromDataArray(vtkSmartPointer< vtkWebGPUConfiguration > wgpuConfiguration, wgpu::Texture texture, std::uint32_t bytesPerRow, vtkDataArray *dataArray, const char *description=nullptr)
Uploads a maximum of bytesToUpload from a vtkDataArray to a texture assuming bytesPerRow bytes of dat...
#define vtkDataArray