3#ifndef vtkWebGPUBufferInternals_h
4#define vtkWebGPUBufferInternals_h
7#include "vtkRenderingWebGPUModule.h"
10VTK_ABI_NAMESPACE_BEGIN
14 static wgpu::Buffer
Upload(
const wgpu::Device& device,
unsigned long offset,
void* data,
15 unsigned long sizeBytes, wgpu::BufferUsage usage,
const char* label =
nullptr);
21 wgpu::Device device, wgpu::Buffer wgpuBuffer,
vtkDataArray* dataArray);
29 static wgpu::Buffer
CreateBuffer(
const wgpu::Device& device,
unsigned long sizeBytes,
30 wgpu::BufferUsage usage,
bool mappedAtCreation =
false,
const char* label =
nullptr);
abstract superclass for arrays of numeric data
static wgpu::Buffer Upload(const wgpu::Device &device, unsigned long offset, void *data, unsigned long sizeBytes, wgpu::BufferUsage usage, const char *label=nullptr)
static void UploadFromDataArray(wgpu::Device device, wgpu::Buffer wgpuBuffer, vtkIdType byteOffset, vtkDataArray *dataArray)
Uploads a vtkDataArray with offset to the given wgpuBuffer.
static wgpu::Buffer CreateBuffer(const wgpu::Device &device, unsigned long sizeBytes, wgpu::BufferUsage usage, bool mappedAtCreation=false, const char *label=nullptr)
static bool CheckBufferSize(const wgpu::Device &device, unsigned long sizeBytes)
static void UploadFromDataArray(wgpu::Device device, wgpu::Buffer wgpuBuffer, vtkDataArray *dataArray)
Uploads a vtkDataArray to the given wgpuBuffer.