class ContentManager
The ContentManager instance is responsible for managing all loaded content.
File location: framework/cauldron/framework/inc/core/contentmanager.h
Construction
Return type |
Description |
---|---|
Constructor with default behavior.
|
Methods
Return type |
Description |
---|---|
void |
Shutdown ()
Shuts down the content manager when framework is terminating.
|
void |
LoadGLTFToScene (std::experimental::filesystem::path& gltfFile)
Loads a glTF file into the scene.
|
void |
LoadParticlesToScene (const std::vector<ParticleSpawnerDesc >& descList)
Loads a number of particle spawners into the scene.
|
void |
LoadTexture ( const TextureLoadInfo & loadInfo, TextureLoadCompletionCallbackFn pCompletionCallback = nullptr, void* pAdditionalParams = nullptr )
Loads a texture.
|
void |
LoadTextures ( const std::vector<TextureLoadInfo >& loadInfoList, TextureLoadCompletionCallbackFn pCompletionCallback = nullptr, void* pAdditionalParams = nullptr )
Loads multiple texture resources.
|
bool |
StartManagingContent (std::wstring contentName, Texture *& pTextureContent)
Tells the content manager it can start managing the texture content once it’s been fully loaded and initialized.
|
const Texture * |
GetTexture (std::wstring contentName)
Fetches the requested texture. Returns nullptr if texture isn’t found.
|
bool |
StartManagingContent ( std::wstring contentName, ContentBlock *& pContentBlock, bool loadedContent = true )
Tells the content manager it can start managing a “ContentBlock“ once it’s been fully loaded and initialized.
|
void |
UnloadContent (std::wstring contentName)
Unloads previously loaded content (texture or “ContentBlock“).
|
void |
UpdateContent (uint64_t currentFrame)
Manages the loading state of content as it flows through loading and unloading.
|
void |
AddContentListener (ContentListener * pListener)
Registers a “ContentListener“ -derived class for content load/unload callbacks.
|
void |
RemoveContentListener (ContentListener * pListener)
Removes a “ContentListener“ -derived class from content load/unload callbacks.
|
bool |
IsCurrentlyLoading () const
Queries whether the ContentManager is currently in the process of loading anything.
|
Detailed description
The ContentManager instance is responsible for managing all loaded content. It is also used to query and fetch loaded content.
Construction
ContentManager
Constructor with default behavior.
Methods
Shutdown
Shuts down the content manager when framework is terminating.
LoadGLTFToScene
Loads a glTF file into the scene.
LoadParticlesToScene
void LoadParticlesToScene (const std::vector<ParticleSpawnerDesc >& descList)
Loads a number of particle spawners into the scene.
LoadTexture
void LoadTexture (
const TextureLoadInfo & loadInfo,
TextureLoadCompletionCallbackFn pCompletionCallback = nullptr,
void* pAdditionalParams = nullptr
)
Loads a texture.
LoadTextures
void LoadTextures (
const std::vector<TextureLoadInfo >& loadInfoList,
TextureLoadCompletionCallbackFn pCompletionCallback = nullptr,
void* pAdditionalParams = nullptr
)
Loads multiple texture resources.
StartManagingContent
bool StartManagingContent (std::wstring contentName, Texture *& pTextureContent)
Tells the content manager it can start managing the texture content once it’s been fully loaded and initialized.
GetTexture
const Texture * GetTexture (std::wstring contentName)
Fetches the requested texture. Returns nullptr if texture isn’t found.
StartManagingContent
bool StartManagingContent (
std::wstring contentName,
ContentBlock *& pContentBlock,
bool loadedContent = true
)
Tells the content manager it can start managing a ContentBlock
once it’s been fully loaded and initialized.
UnloadContent
Unloads previously loaded content (texture or ContentBlock
).
UpdateContent
Manages the loading state of content as it flows through loading and unloading.
AddContentListener
void AddContentListener (ContentListener * pListener)
Registers a ContentListener
-derived class for content load/unload callbacks.
RemoveContentListener
void RemoveContentListener (ContentListener * pListener)
Removes a ContentListener
-derived class from content load/unload callbacks.
IsCurrentlyLoading
Queries whether the ContentManager is currently in the process of loading anything.