Class Asset
Defined in File Asset.hpp
Inheritance Relationships
Base Type
public Cacao::Resource
(Class Resource)
Derived Types
public Cacao::Cubemap
(Class Cubemap)public Cacao::Mesh
(Class Mesh)public Cacao::Sound
(Class Sound)public Cacao::Tex2D
(Class Tex2D)
Class Documentation
-
class Asset : public Cacao::Resource
Base class for asset types.
Subclassed by Cacao::Cubemap, Cacao::Mesh, Cacao::Sound, Cacao::Tex2D
Public Functions
-
virtual void Realize() = 0
Synchronously convert the loaded data into a form suitable for use.
- Throws:
BadRealizeStateException – If the asset is already realized
-
virtual std::shared_future<void> RealizeAsync() = 0
Asynchronously convert the loaded data into a form suitable for use.
- Throws:
BadRealizeStateException – If the asset is already realized
- Returns:
A future that will resolve when realization is complete or fails
-
virtual void DropRealized() = 0
Destroy the realized representation of the asset.
- Throws:
BadRealizeStateException – If the asset is not realized
-
virtual void Realize() = 0