VTK  9.7.20260913
vtkWebGPURenderPipelineDescriptorInternals.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 vtkWebGPURenderPipelineDescriptorInternals_h
4#define vtkWebGPURenderPipelineDescriptorInternals_h
5
6#include "vtkRenderingWebGPUModule.h"
7#include "vtk_wgpu.h"
8
9#include <array>
10
11VTK_ABI_NAMESPACE_BEGIN
20class VTKRENDERINGWEBGPU_NO_EXPORT vtkWebGPURenderPipelineDescriptorInternals
21 : public WGPURenderPipelineDescriptor
22{
23public:
24 static constexpr int kMaxVertexBuffers = 8u;
25 static constexpr int kMaxVertexAttributes = 16u;
26 static constexpr int kMaxColorAttachments = 8u;
27
29
37
38 WGPUDepthStencilState* EnableDepthStencil(
39 WGPUTextureFormat format = WGPUTextureFormat_Depth24PlusStencil8);
41
42 WGPUBlendState* EnableBlending(std::size_t colorTargetId);
43 void DisableBlending(std::size_t colorTargetId);
44
45 std::array<WGPUVertexBufferLayout, kMaxVertexBuffers> cBuffers;
46 std::array<WGPUVertexAttribute, kMaxVertexAttributes> cAttributes;
47 std::array<WGPUColorTargetState, kMaxColorAttachments> cTargets;
48 std::array<WGPUBlendState, kMaxColorAttachments> cBlends;
49
50 WGPUFragmentState cFragment = WGPU_FRAGMENT_STATE_INIT;
51 WGPUDepthStencilState cDepthStencil = WGPU_DEPTH_STENCIL_STATE_INIT;
52};
53VTK_ABI_NAMESPACE_END
54
55#endif
56// VTK-HeaderTest-Exclude: vtkWebGPURenderPipelineDescriptorInternals.h
std::array< WGPUColorTargetState, kMaxColorAttachments > cTargets
vtkWebGPURenderPipelineDescriptorInternals & operator=(const vtkWebGPURenderPipelineDescriptorInternals &)=delete
WGPUBlendState * EnableBlending(std::size_t colorTargetId)
vtkWebGPURenderPipelineDescriptorInternals & operator=(vtkWebGPURenderPipelineDescriptorInternals &&)=delete
std::array< WGPUVertexAttribute, kMaxVertexAttributes > cAttributes
vtkWebGPURenderPipelineDescriptorInternals(vtkWebGPURenderPipelineDescriptorInternals &&)=delete
std::array< WGPUVertexBufferLayout, kMaxVertexBuffers > cBuffers
std::array< WGPUBlendState, kMaxColorAttachments > cBlends
void DisableBlending(std::size_t colorTargetId)
WGPUDepthStencilState * EnableDepthStencil(WGPUTextureFormat format=WGPUTextureFormat_Depth24PlusStencil8)
vtkWebGPURenderPipelineDescriptorInternals(const vtkWebGPURenderPipelineDescriptorInternals &)=delete