StageInterface class final

What one stage of a pipeline declares at its edges: what comes in, what goes out, and the uniform blocks it reads.

What the stage agreement check reads (amendment 5 of the field review). The bundle writer makes one per stage, from the GLSL after its includes are resolved (StageInterface.fromGlsl) or from a backend's reflection, and holds the stages of every pipeline to each other with checkStageAgreement; a mismatch is a build error naming both stages, not a crash on one backend at the first draw.

Constructors

StageInterface({required String name, required bool fragment, List<StageVariable> inputs = const <StageVariable>[], List<StageVariable> outputs = const <StageVariable>[], Map<String, List<StageBlockMember>> blocks = const <String, List<StageBlockMember>>{}})
const
StageInterface.fromGlsl(String glsl, {required String name, required bool fragment})
Reads the declarations of glsl — a stage's source with its #includes already resolved — as the engine's GLSL writes them: in and out at the top level, with or without a layout(location = N), and uniform Name { … } blocks. Comments are skipped; anything else (a function's own locals, a #define) is not a declaration here.
factory

Properties

blocks → Map<String, List<StageBlockMember>>
Each uniform block it declares, by name, with its members in order.
final
fragment → bool
Whether this is a fragment stage.
final
hashCode → int
The hash code for this object.
no setterinherited
inputs → List<StageVariable>
For a vertex stage its attributes, for a fragment stage its varyings.
final
name → String
The entry point's name.
final
outputs → List<StageVariable>
For a vertex stage its varyings, for a fragment stage its colour outputs.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited