RenderPipeline
On this page

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 only string
fragmentread only string | null

Instance methods

draw (pass: object, bindings: B, geometry: Geometry): void

Record 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

Edit this page Report a problem