Enum ResourceType¶
Defined in File resource_types.h
Enum Documentation¶
-
enum class portal::ResourceType : uint16_t¶
Categorizes resources by their semantic type in the asset pipeline.
ResourceType identifies what kind of asset a resource represents. This determines:
Which loader implementation handles the resource (via LoaderFactory)
How the resource integrates with the renderer and ECS systems
What metadata is associated with the resource in the database
The type is extracted from the template parameter when calling ResourceRegistry::load<T>() using the static method T::static_type(). For example, TextureResource::static_type() returns ResourceType::Texture.
Usage:
// Type is inferred from template parameter auto texture_ref = registry.load<TextureResource>(STRING_ID("textures/albedo.png")); // Internally calls TextureResource::static_type() → ResourceType::Texture // LoaderFactory maps type to loader auto& loader = loader_factory.get(ResourceType::Texture); // Returns TextureLoader instance
See also
LoaderFactory for the type-to-loader mapping
See also
SourceMetadata::type for where this is stored in metadata
See also
utils::find_extension_type() for file extension to type mapping
Values:
-
enumerator Unknown¶
-
enumerator Material¶
-
enumerator Texture¶
-
enumerator Shader¶
-
enumerator Mesh¶
-
enumerator Scene¶
-
enumerator Composite¶
-
enumerator Font¶