16#include <unordered_map>
108 const std::filesystem::path& source,
127 [[nodiscard]]
static std::string
keyFor(
const std::filesystem::path& source);
179 std::string_view nodeName
205 [[nodiscard]]
static std::string
keyFor(
const std::filesystem::path& source);
Type-erased texture handle for runtime storage.
const GeometryMeshStore & geometryMeshes() const
Assets::GltfHandle resolve(Assets::Authored::GltfAssetRef ref)
MaterialStore & materials()
Texture2DStore texture2Ds_
AssetManager * assetManager_
Assets::AudioClipHandle resolve(Assets::Authored::AudioAssetRef ref)
AssetRegistry(AssetManager *assetManager=nullptr)
const MaterialStore & materials() const
Texture2DStore & texture2Ds()
AudioClipStore audioClips_
const AudioClipStore & audioClips() const
GeometryMeshStore & geometryMeshes()
GeometryMeshStore geometryMeshes_
AudioClipStore & audioClips()
const Texture2DStore & texture2Ds() const
Assets::GltfRenderableHandle resolve(Assets::Authored::GltfRenderableAssetRef ref)
Assets::GeometryMeshHandle resolve(Assets::Authored::GeometryMeshAssetRef ref)
const GltfStore & gltfs() const
void setAssetManager(AssetManager *assetManager)
Assets::Texture2DHandle resolve(Assets::Authored::Texture2DAssetRef ref)
static std::string keyFor(const Asset::Path &source)
std::unordered_map< std::string, uint32_t > sourceToIndex_
const Asset::Path * sourcePath(Assets::AudioClipHandle handle) const
AudioClipStore(AssetManager *assetManager=nullptr)
AssetManager * assetManager_
std::vector< Record > records_
Assets::AudioClipHandle load(const Asset::Path &source)
void setAssetManager(AssetManager *assetManager)
bool isValid(Assets::AudioClipHandle handle) const
Assets::AudioClipHandle load(const std::filesystem::path &source)
Assets::AudioAssetRef ref(Assets::AudioClipHandle handle) const
AssetManager * assetManager_
Assets::MeshAssetRef ref(Assets::GeometryMeshHandle handle) const
const Asset::MeshPath * path(Assets::GeometryMeshHandle handle) const
GeometryMeshStore(AssetManager *assetManager=nullptr)
bool isValid(Assets::GeometryMeshHandle handle) const
void setAssetManager(AssetManager *assetManager)
std::unordered_map< std::string, uint32_t > pathToIndex_
Assets::GeometryMeshHandle load(const Asset::MeshPath &meshPath)
static std::string keyFor(const Asset::MeshPath &meshPath)
std::vector< Record > records_
void setGeometryMeshStore(GeometryMeshStore *geometryMeshes)
const GltfRenderableRecord * get(Assets::GltfRenderableHandle renderable) const
Assets::GeometryMeshHandle geometryMesh(Assets::GltfRenderableHandle renderable) const
Assets::GltfRenderableHandle renderable(Assets::GltfHandle gltf, std::string_view nodeName)
const std::filesystem::path * sourcePath(Assets::GltfHandle gltf) const
Assets::GltfHandle load(const std::filesystem::path &source)
static std::string fallbackNodeName(size_t nodeIndex)
void importMetadata(Assets::GltfHandle gltf)
std::vector< RenderableRecord > renderableRecords_
GltfStore(AssetManager *assetManager=nullptr, GeometryMeshStore *geometryMeshes=nullptr, MaterialStore *materials=nullptr)
static std::string keyFor(const std::filesystem::path &source)
bool isValid(Assets::GltfHandle handle) const
GeometryMeshStore * geometryMeshes_
MaterialStore * materials_
void setMaterialStore(MaterialStore *materials)
std::vector< GltfRecord > gltfRecords_
std::unordered_map< std::string, uint32_t > sourceToIndex_
bool isValid(Assets::GltfRenderableHandle handle) const
AssetManager * assetManager_
void setAssetManager(AssetManager *assetManager)
const Asset::MeshPath * path(Assets::MaterialHandle handle) const
static std::string keyFor(const Asset::MeshPath &materialPath)
std::vector< Record > records_
Assets::MaterialAssetRef ref(Assets::MaterialHandle handle) const
MaterialStore(AssetManager *assetManager=nullptr)
void setAssetManager(AssetManager *assetManager)
std::unordered_map< std::string, uint32_t > pathToIndex_
bool isValid(Assets::MaterialHandle handle) const
Assets::MaterialHandle load(const Asset::MeshPath &materialPath)
AssetManager * assetManager_
bool isValid(Assets::Texture2DHandle handle) const
Texture2DStore(AssetManager *assetManager=nullptr)
static std::string keyFor(const std::filesystem::path &source)
Assets::TextureType usage(Assets::Texture2DHandle handle) const
AssetManager * assetManager_
const std::filesystem::path * sourcePath(Assets::Texture2DHandle handle) const
Assets::TextureHandle legacyHandle(Assets::Texture2DHandle handle) const
Assets::Texture2DHandle load(const std::filesystem::path &source, Assets::TextureType usage=Assets::TextureType::BaseColor)
void setAssetManager(AssetManager *assetManager)
std::vector< Record > records_
std::unordered_map< std::string, uint32_t > sourceToIndex_
AssetHandle< GltfRenderableHandleTag > GltfRenderableHandle
Asset::Ref< Asset::Path, Audio > AudioAssetRef
AssetHandle< Texture2DHandleTag > Texture2DHandle
AssetHandle< GltfHandleTag > GltfHandle
Asset::Ref< Asset::MeshPath, Mesh > MeshAssetRef
AssetHandle< GeometryMeshHandleTag > GeometryMeshHandle
Asset::Ref< Asset::MeshPath, Material > MaterialAssetRef
TextureType
Represents the semantic type of a texture, determining its Vulkan format.
@ BaseColor
Color data with gamma (SRGB format for 8-bit)
AssetHandle< AudioClipHandleTag > AudioClipHandle
AssetHandle< MaterialHandleTag > MaterialHandle
Manages IBL (Image-Based Lighting) resources for specular reflections.
Identifies a named mesh-like asset inside an asset file.
Identifies a single asset file on disk.
uint64_t payloadGeneration
uint64_t residencyGeneration
uint64_t residencyGeneration
uint64_t payloadGeneration
Ecs::Transform authoredTransform
Assets::GeometryMeshHandle geometry
std::vector< Assets::MaterialHandle > primitiveMaterials
std::unordered_map< std::string, Assets::GltfRenderableHandle > renderablesByName
std::filesystem::path source
uint64_t payloadGeneration
uint64_t residencyGeneration
GltfRenderableRecord data
uint64_t residencyGeneration
uint64_t payloadGeneration
uint64_t residencyGeneration
uint64_t payloadGeneration
uint64_t residencyGeneration
uint64_t payloadGeneration
Assets::TextureType usage
std::filesystem::path source
Assets::TextureHandle legacyHandle