OGRE 14.3
Object-Oriented Graphics Rendering Engine
|
This class is used to perform Resource operations in a background thread. More...
#include <OgreResourceBackgroundQueue.h>
Public Member Functions | |
ResourceBackgroundQueue () | |
virtual | ~ResourceBackgroundQueue () |
std::future< void > | initialiseAllResourceGroups () |
Initialise all resource groups which are yet to be initialised in the background. | |
std::future< void > | initialiseResourceGroup (const String &name) |
Initialise a resource group in the background. | |
std::future< void > | load (const ResourcePtr &res) |
Load a single resource in the background. | |
std::future< void > | loadResourceGroup (const String &name) |
Loads a resource group in the background. | |
std::future< void > | prepare (const ResourcePtr &res) |
Prepare a single resource in the background. | |
std::future< void > | prepareResourceGroup (const String &name) |
Prepares a resource group in the background. | |
std::future< void > | unload (const ResourcePtr &res) |
Unload a single resource in the background. | |
std::future< void > | unloadResourceGroup (const String &name) |
Unloads a resource group in the background. | |
Public Member Functions inherited from Ogre::Singleton< ResourceBackgroundQueue > | |
Singleton (void) | |
~Singleton (void) | |
Static Public Member Functions | |
static ResourceBackgroundQueue & | getSingleton (void) |
Get the singleton instance. | |
static ResourceBackgroundQueue * | getSingletonPtr (void) |
Get the singleton instance. | |
Static Public Member Functions inherited from Ogre::Singleton< ResourceBackgroundQueue > | |
static ResourceBackgroundQueue & | getSingleton (void) |
Get the singleton instance. | |
static ResourceBackgroundQueue * | getSingletonPtr (void) |
Get the singleton instance. | |
This class is used to perform Resource operations in a background thread.
All these requests are now queued via Root::getWorkQueue in order to share the thread pool amongst all background tasks. You should therefore refer to that class for configuring the behaviour of the threads themselves, this class merely provides an interface that is specific to resource loading around this common functionality.
Ogre::ResourceBackgroundQueue::ResourceBackgroundQueue | ( | ) |
|
virtual |
Initialise a resource group in the background.
name | The name of the resource group to initialise |
std::future< void > Ogre::ResourceBackgroundQueue::initialiseAllResourceGroups | ( | ) |
Initialise all resource groups which are yet to be initialised in the background.
Prepares a resource group in the background.
name | The name of the resource group to prepare |
Loads a resource group in the background.
name | The name of the resource group to load |
std::future< void > Ogre::ResourceBackgroundQueue::unload | ( | const ResourcePtr & | res | ) |
Unload a single resource in the background.
Unloads a resource group in the background.
name | The name of the resource group to load |
std::future< void > Ogre::ResourceBackgroundQueue::prepare | ( | const ResourcePtr & | res | ) |
Prepare a single resource in the background.
std::future< void > Ogre::ResourceBackgroundQueue::load | ( | const ResourcePtr & | res | ) |
Load a single resource in the background.
|
static |
Get the singleton instance.
|
static |
Get the singleton instance.