MaterialCompilerRegistry class final

The material compilers of one build or one engine, by backend.

One per build and one per engine, not one per process: an application makes one, registers the compilers of the backends it ships, and hands it to RuntimeShaders; a build hook makes its own. A compiler registered for a backend that already has one replaces it until its registration is cancelled, so an application can swap the engine's.

Constructors

MaterialCompilerRegistry([Iterable<MaterialCompiler> compilers = const []])

Properties

backends → Set<String>
The backends a compiler is registered for, each once.
no setter
compilers → List<MaterialCompiler>
Every compiler registered, the latest last.
no setter
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

forBackend(String backend) → MaterialCompiler?
The compiler for backend — the one registered last — or null. backend is a backend id, compared exactly.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
register(MaterialCompiler compiler) → Registration
Makes compiler the one forBackend answers for its backend, until the result is cancelled.
toString() → String
A string representation of this object.
inherited

Operators

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