API

Function disposeMeshGpu

  • Destroy all GPU resources owned by a mesh (vertex buffers, skeleton, morph targets). _gpu may be shared across glTF nodes or mesh clones; skeleton/morph/thin-instance resources may also be shared by clones. Each resource is destroyed only after its last owning mesh releases it (see resource/ref-count.ts).

    Every claim this mesh held is released here, exactly once, so the mesh is retired for good: it is marked _disposed, repeat calls are no-ops, and addToScene rejects it from then on (see scene/mesh-scene-registry.ts). That keeps the failure loud instead of silently drawing with destroyed handles, and keeps the ref-counts honest — a second release from the same mesh would free buffers a surviving sibling still renders with. Create a new mesh instead.

    Parameters

    Returns void