VTK  9.4.20241113
vtkWebGPUCallbacksInternals.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#ifndef vtkWebGPUCallbacksInternals_h
4#define vtkWebGPUCallbacksInternals_h
5
6#include "vtkRenderingWebGPUModule.h" // For export macro
7#include "vtk_wgpu.h"
8
9VTK_ABI_NAMESPACE_BEGIN
10
14class VTKRENDERINGWEBGPU_NO_EXPORT vtkWebGPUCallbacksInternals
15{
16public:
20 static void DeviceLostCallback(const WGPUDevice* device, WGPUDeviceLostReason reason,
21 char const* message, void* userdata = nullptr);
22
27 WGPUErrorType type, char const* message, void* userdata = nullptr);
28
29 /*
30 * Logs a VTK error based on the WGPU error type and message given
31 */
32 static void PrintWGPUError(WGPUErrorType type, const char* message, void* userdata = nullptr);
33};
34
35VTK_ABI_NAMESPACE_END
36
37#endif
Utilitary class for various WebGPU callbacks methods.
static void DeviceLostCallback(const WGPUDevice *device, WGPUDeviceLostReason reason, char const *message, void *userdata=nullptr)
Callback called when the WGPU device is lost.
static void UncapturedErrorCallback(WGPUErrorType type, char const *message, void *userdata=nullptr)
Callback called when an error occured in the manipulation of WGPU.
static void PrintWGPUError(WGPUErrorType type, const char *message, void *userdata=nullptr)