VTK  9.7.20260914
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, WGPUTexture texture,
22 std::uint32_t bytesPerRow, std::uint32_t byteSize, const void* data,
23 const char* description = nullptr);
24
30 WGPUTexture texture, std::uint32_t bytesPerRow, vtkDataArray* dataArray,
31 const char* description = nullptr);
32
36 static WGPUTexelCopyTextureInfo GetTexelCopyTextureInfo(
37 WGPUTexture texture, WGPUOrigin3D origin = { 0, 0, 0 }, std::uint32_t mipLevel = 0);
38
43 static WGPUTexelCopyBufferLayout GetDataLayout(
44 WGPUTexture 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 WGPUTexelCopyBufferLayout GetDataLayout(WGPUTexture 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 Upload(vtkSmartPointer< vtkWebGPUConfiguration > wgpuConfiguration, WGPUTexture 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 WGPUTexelCopyTextureInfo GetTexelCopyTextureInfo(WGPUTexture texture, WGPUOrigin3D 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 UploadFromDataArray(vtkSmartPointer< vtkWebGPUConfiguration > wgpuConfiguration, WGPUTexture 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