RenderPipeline
Interface in Runtime
A render pipeline: a vertex entry, a fragment entry and the state, drawn with bindings by name.
import type { RenderPipeline } from 'typeshade/runtime'
The signature, the description and the examples come from the compiler's own source at commit af54ddad5.
Syntax
interface RenderPipeline<B = Bindings> { readonly vertex: string; readonly fragment: string | null; draw(pass: object, bindings: B, geometry: Geometry): void;}Description
B is the bindings the two entries reach (change 0030).
Instance properties
vertexread onlystringfragmentread onlystring | null
Instance methods
draw(pass: object, bindings: B, geometry: Geometry): voidRecord a draw into the host’s render pass, or a frame’s. Escape hatch (Rule 11.17): the host’s
GPURenderPassEncoder, which the draw records into; WebGL2 takes a frame’s pass only.
Source
src/runtime/program.ts, line 440, at commit af54ddad5