Struct Builder
Defined in File shader-asset-builder.h
Inheritance Relationships
Derived Type
private CE::Rendering::OpenGL::ResourceProvider(Class ResourceProvider)
Struct Documentation
-
struct Builder
Optional provider-owned shader/material capability; borrow it only while its provider lives.
Validation is CPU-only; construction obeys provider upload affinity.
See also
Subclassed by CE::Rendering::OpenGL::ResourceProvider
Public Functions
-
virtual ~Builder() = default
Release builder adapter state; the provider owns its availability/lifetime.
-
virtual void validate_program(const ProgramRecipe &recipe) const = 0
Validate a program recipe against this backend’s supported stage rules without native construction.
- Parameters:
recipe – Stable CPU stage/source metadata. Validation errors throw before publication; successful validation is not proof that native compilation will succeed.
-
virtual void validate_material(const MaterialRecipe &recipe, const ProgramRecipe &program) const = 0
Validate CPU material/program agreement and backend mapping syntax.
- Parameters:
recipe – Stable public parameter/state/binding recipe.
program – Referenced program recipe. No native compilation/reflection or cache publication occurs; unsupported capabilities reject explicitly.
-
virtual std::shared_ptr<CE::Rendering::Resources::Program> build_program(const ProgramRecipe &recipe) = 0
Declaration:
[[nodiscard]]Build a complete executable candidate on the provider loading owner/current context.
- Parameters:
recipe – Owned-source recipe borrowed through this call.
- Returns:
Retained executable ready for material construction. Validation/compile/link/allocation failures propagate; building alone publishes no catalogue entry.
Declaration:
[[nodiscard]]Build a complete immutable material candidate with native reflection/validation.
- Parameters:
recipe – Material public contract and backend mappings.
program – Matching source recipe for executable.
executable – Retained linked program from this provider domain.
- Returns:
Complete retained material, without catalogue publication. Runs on the provider loading owner/current context. Invalid mappings/domains, unsupported state or backend/allocation errors reject the candidate; old published generations are unaffected.
-
virtual std::shared_ptr<const CE::Rendering::Resources::Material> build_builtin_material(CE::Rendering::Materials::Builtin2D kind, CE::Rendering::Pipelines::Blend blend)
Declaration:
[[nodiscard]]Optional backend implementation of an embedded default profile.
- Parameters:
kind – Requested vertex/semantic profile.
blend – Fixed blend mode.
- Returns:
Complete retained material constructed on the provider owner. The base throws failed_operation; adapters must not silently select another backend or require application shader files.
-
virtual ~Builder() = default