public sealed class ComposeBindingsWhich concrete shader fills each compose slot — one material's worth of feature choices.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
A compose member is a shader-typed field declared against a protocol: compose val diffuse: IDiffuseModel. The shader is written once against the protocol, and each material says which implementation to use. Resolution happens at compile time, so a call through the slot becomes a direct call to the implementation — there is no dispatch at runtime.
Slots are named by field, optionally qualified by shader (Lit.diffuse) when two shaders in one compilation declare a slot of the same name and need different implementations.
Fields and properties (2)
public static ComposeBindings EmptyNothing bound. A shader with an unfilled slot will not compile.
public int CountNumber of slots bound.
Methods (5)
public IEnumerator<KeyValuePair<string, string>> GetEnumerator()Returns an enumerator that iterates through the collection.
public static ComposeBindings Create(IEnumerable<KeyValuePair<string, string>> bindings)Builds a set from slot/shader pairs.
public static ComposeBindings Parse(IEnumerable<string> entries)Parses slot=Shader strings, as a command line or material definition supplies them. The slot may be qualified: Lit.diffuse=Lambert.
public static bool TryParse(IEnumerable<string> entries, out ComposeBindings bindings, out string? error)Parses slot=Shader strings, reporting a malformed entry rather than throwing — for callers that show the problem to a person.
public string? Resolve(string containingShader, string slot)The shader bound to a slot, or null if none is. A binding qualified by shader wins over a bare one, so a compilation can bind most slots once and override per shader.
Used by (13)
- CompilationVixen.Raven
- CompileDriverVixen.Raven.Cli
- CompiledLibraryTestsVixen.Raven.Tests
- ComposeBindingsTestsVixen.Raven.Tests
- ComposeInterfaceTestsVixen.Raven.Tests
- ComposeTestsVixen.Raven.Tests
- InheritanceTestsVixen.Raven.Tests
- LibraryCompositionVixen.Raven.Tests
- LoweringTestBaseVixen.Raven.Tests
- RavenEffectCompilerVixen.ShaderCompiler
- SharedBindingTestsVixen.Raven.Tests
- SourceFieldSymbolVixen.Raven
- SourceNamedTypeSymbolVixen.Raven