|
|
Donner 0.5.0
Embeddable browser-grade SVG2 engine
|
Caches a compiled wgpu::RenderPipeline for the Slug fill shader, plus its bind group layout. More...
#include "donner/svg/renderer/geode/GeodePipeline.h"
Public Member Functions | |
| GeodePipeline (const wgpu::Device &device, wgpu::TextureFormat colorFormat) | |
| Create a Slug fill pipeline for the given device and color target format. | |
| GeodePipeline (const GeodePipeline &)=delete | |
| GeodePipeline & | operator= (const GeodePipeline &)=delete |
| GeodePipeline (GeodePipeline &&) noexcept=default | |
| GeodePipeline & | operator= (GeodePipeline &&) noexcept=default |
| const wgpu::RenderPipeline & | pipeline () const |
| The compiled render pipeline. | |
| const wgpu::BindGroupLayout & | bindGroupLayout () const |
| The bind group layout used by the pipeline. | |
| wgpu::TextureFormat | colorFormat () const |
| Color format the pipeline was built for. | |
Caches a compiled wgpu::RenderPipeline for the Slug fill shader, plus its bind group layout.
One GeodePipeline instance is sufficient per (device, render-target-format) pair — the actual data (uniforms, vertex buffers, bands, curves) varies per draw call but the pipeline state object can be reused.
The bind group layout matches the shader in shaders/slug_fill.wgsl:
The vertex buffer layout is:
| donner::geode::GeodePipeline::GeodePipeline | ( | const wgpu::Device & | device, |
| wgpu::TextureFormat | colorFormat ) |
Create a Slug fill pipeline for the given device and color target format.
| device | The WebGPU device. |
| colorFormat | The pixel format of the render target this pipeline will draw into. Must match the target texture's format at draw time. |