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

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

Registers a “ContentListener“ -derived class for content load/unload callbacks.

void

Removes a “ContentListener“ -derived class from content load/unload callbacks.

bool

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

Copied!

ContentManager ()

Constructor with default behavior.


Methods

Shutdown

Copied!

void Shutdown ()

Shuts down the content manager when framework is terminating.


LoadGLTFToScene

Copied!

void LoadGLTFToScene (std::experimental::filesystem::path& gltfFile)

Loads a glTF file into the scene.


LoadParticlesToScene

Copied!

void LoadParticlesToScene (const std::vector<ParticleSpawnerDesc >& descList)

Loads a number of particle spawners into the scene.


LoadTexture

Copied!

void LoadTexture (
    const TextureLoadInfo & loadInfo,
    TextureLoadCompletionCallbackFn  pCompletionCallback = nullptr,
    void* pAdditionalParams = nullptr
)

Loads a texture.


LoadTextures

Copied!

void LoadTextures (
    const std::vector<TextureLoadInfo >& loadInfoList,
    TextureLoadCompletionCallbackFn  pCompletionCallback = nullptr,
    void* pAdditionalParams = nullptr
)

Loads multiple texture resources.


StartManagingContent

Copied!

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

Copied!

const Texture * GetTexture (std::wstring contentName)

Fetches the requested texture. Returns nullptr if texture isn’t found.


StartManagingContent

Copied!

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

Copied!

void UnloadContent (std::wstring contentName)

Unloads previously loaded content (texture or ContentBlock).


UpdateContent

Copied!

void UpdateContent (uint64_t currentFrame)

Manages the loading state of content as it flows through loading and unloading.


AddContentListener

Copied!

void AddContentListener (ContentListener * pListener)

Registers a ContentListener -derived class for content load/unload callbacks.


RemoveContentListener

Copied!

void RemoveContentListener (ContentListener * pListener)

Removes a ContentListener -derived class from content load/unload callbacks.


IsCurrentlyLoading

Copied!

bool IsCurrentlyLoading () const

Queries whether the ContentManager is currently in the process of loading anything.