VTK  9.7.1
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 
11 VTK_ABI_NAMESPACE_BEGIN
12 class VTKRENDERINGWEBGPU_NO_EXPORT vtkWebGPURenderPipelineDescriptorInternals
13  : public wgpu::RenderPipelineDescriptor
14 {
15 public:
16  static constexpr int kMaxVertexBuffers = 8u;
17  static constexpr int kMaxVertexAttributes = 16u;
18  static constexpr int kMaxColorAttachments = 8u;
19 
21 
29 
30  wgpu::DepthStencilState* EnableDepthStencil(
31  wgpu::TextureFormat format = wgpu::TextureFormat::Depth24PlusStencil8);
32  void DisableDepthStencil();
33 
34  wgpu::BlendState* EnableBlending(std::size_t colorTargetId);
35  void DisableBlending(std::size_t colorTargetId);
36 
37  std::array<wgpu::VertexBufferLayout, kMaxVertexBuffers> cBuffers;
38  std::array<wgpu::VertexAttribute, kMaxVertexAttributes> cAttributes;
39  std::array<wgpu::ColorTargetState, kMaxColorAttachments> cTargets;
40  std::array<wgpu::BlendState, kMaxColorAttachments> cBlends;
41 
42  wgpu::FragmentState cFragment;
43  wgpu::DepthStencilState cDepthStencil;
44 };
45 VTK_ABI_NAMESPACE_END
46 
47 #endif
48 // VTK-HeaderTest-Exclude: vtkWebGPURenderPipelineDescriptorInternals.h
std::array< wgpu::ColorTargetState, kMaxColorAttachments > cTargets
std::array< wgpu::VertexAttribute, kMaxVertexAttributes > cAttributes
std::array< wgpu::BlendState, kMaxColorAttachments > cBlends
std::array< wgpu::VertexBufferLayout, kMaxVertexBuffers > cBuffers