VTK  9.7.20260913
vtkWebGPURenderPassCreateInfoInternals.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 vtkWebGPURenderPassCreateInfoInternals_h
4#define vtkWebGPURenderPassCreateInfoInternals_h
5
8#include "vtkRenderingWebGPUModule.h"
9#include "vtk_wgpu.h"
10
11VTK_ABI_NAMESPACE_BEGIN
12class VTKRENDERINGWEBGPU_NO_EXPORT vtkWebGPURenderPassCreateInfoInternals
13{
14public:
17 WGPUTextureFormat texture = DefaultColorFormat);
18
19 static constexpr WGPUTextureFormat DefaultColorFormat = WGPUTextureFormat_RGBA8Unorm;
20
22 uint32_t width, uint32_t height, WGPUTextureFormat format = DefaultColorFormat);
23
24 uint32_t width;
25 uint32_t height;
26 vtkWebGPU::Texture color;
27 WGPUTextureFormat colorFormat;
28 // renderPassInfo only borrows the view, so this keeps it alive. Declared
29 // before renderPassInfo so it is constructed first.
30 vtkWebGPU::TextureView colorView;
32};
33VTK_ABI_NAMESPACE_END
34
35#endif
36// VTK-HeaderTest-Exclude: vtkWebGPURenderPassCreateInfoInternals.h
vtkWebGPURenderPassCreateInfoInternals(uint32_t width, uint32_t height, WGPUTexture color, WGPUTextureFormat texture=DefaultColorFormat)
static vtkWebGPURenderPassCreateInfoInternals CreateBasicRenderPass(WGPUDevice device, uint32_t width, uint32_t height, WGPUTextureFormat format=DefaultColorFormat)
Reference-counted ownership for WebGPU C API handles.