Skip to content

ludus::resources::MeshDefinitionAdapter

Ludus Wiki · API overview · Browse API

Class

CPU mesh-definition adapter: at most 16 sources and 16 simultaneous candidate/resident slots. All methods/callbacks run on the Manager control owner, outside render/audio critical sections. Initialize validates geometry and copies metadata; it borrows immutable source arrays. Begin allocates candidate arrays explicitly; each Poll copies at most 128 vertices and 384 indices. Retirement frees only CPU copies, synchronously, with no submitted CPU borrowers after the last lease. This adapter never installs or charges GPU resources. Context and source arrays outlive Manager::Shutdown returning Ok. No file I/O, decoder, global registration, source mutation, dependency scheduling or reload is implied.

Declared in modules/runtime/resources/include/ludus/runtime/resources/mesh.h

#include <ludus/runtime/resources/mesh.h>
class ludus::resources::MeshDefinitionAdapter final

Methods

MeshDefinitionAdapter

ludus::resources::MeshDefinitionAdapter::MeshDefinitionAdapter() noexcept=default
Construct without allocation or ownership.

Declared in modules/runtime/resources/include/ludus/runtime/resources/mesh.h

~MeshDefinitionAdapter

ludus::resources::MeshDefinitionAdapter::~MeshDefinitionAdapter() noexcept
Free fixed control storage.

Precondition

All manager candidates have retired.

Declared in modules/runtime/resources/include/ludus/runtime/resources/mesh.h

MeshDefinitionAdapter

ludus::resources::MeshDefinitionAdapter::MeshDefinitionAdapter(const MeshDefinitionAdapter &)=delete
Context identity cannot be copied.

Declared in modules/runtime/resources/include/ludus/runtime/resources/mesh.h

operator=

MeshDefinitionAdapter & ludus::resources::MeshDefinitionAdapter::operator=(const MeshDefinitionAdapter &)=delete
Context identity cannot be assigned.

Related types: MeshDefinitionAdapter

Declared in modules/runtime/resources/include/ludus/runtime/resources/mesh.h

Initialize

Status ludus::resources::MeshDefinitionAdapter::Initialize(const MeshSource *sources, usize count) noexcept
Validate and copy 1..16 source metadata into fixed control storage. Invalid/duplicate IDs, mismatched kind, bad topology, nonfinite attributes, empty normals or limits return Failed; allocation returns OutOfMemory.

Precondition

Every manager using an earlier Descriptor has completed Shutdown (Ok). Live candidates prevent reinitialization (InvalidState). Failure preserves a previous drained profile. Success obtains a fresh nonreused epoch.

Related types: usize · Status · MeshSource

Declared in modules/runtime/resources/include/ludus/runtime/resources/mesh.h

Descriptor

Adapter ludus::resources::MeshDefinitionAdapter::Descriptor() noexcept
Return callbacks for the copied immutable profile; use only after Initialize succeeds. Peak reserves the largest source's CPU array bytes for each operation; preparation is zero because arrays are allocated directly as candidate/resident storage. Context control allocation and borrowed source storage are outside these reservations.

Related types: Adapter

Declared in modules/runtime/resources/include/ludus/runtime/resources/mesh.h

ControlBytes

usize ludus::resources::MeshDefinitionAdapter::ControlBytes() const noexcept
Fixed control bytes allocated after Initialize (excluding allocator headers/sources).

Related types: usize

Declared in modules/runtime/resources/include/ludus/runtime/resources/mesh.h