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 []])
A registry holding compilers, registered in order, so a later one for the same backend wins.

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

add(MaterialCompiler compiler) → Registration
Makes compiler the one forBackend answers for its backend, until the result is cancelled.
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
toString() → String
A string representation of this object.
inherited

Operators

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

Constants

reservedSections → const Map<String, BackendId?>
The bundle sections the engine keeps, each with the backend whose compiler may write it, or null for one no compiler writes: the stamp, the kernel section, and d3d12, reserved since 1.0 for the engine's own Direct3D 12 writer.