OGRE 14.3
Object-Oriented Graphics Rendering Engine
Loading...
Searching...
No Matches
Ogre::ResourceBackgroundQueue Class Reference

This class is used to perform Resource operations in a background thread. More...

#include <OgreResourceBackgroundQueue.h>

+ Inheritance diagram for Ogre::ResourceBackgroundQueue:

Public Member Functions

 ResourceBackgroundQueue ()
 
virtual ~ResourceBackgroundQueue ()
 
std::future< voidinitialiseAllResourceGroups ()
 Initialise all resource groups which are yet to be initialised in the background.
 
std::future< voidinitialiseResourceGroup (const String &name)
 Initialise a resource group in the background.
 
std::future< voidload (const ResourcePtr &res)
 Load a single resource in the background.
 
std::future< voidloadResourceGroup (const String &name)
 Loads a resource group in the background.
 
std::future< voidprepare (const ResourcePtr &res)
 Prepare a single resource in the background.
 
std::future< voidprepareResourceGroup (const String &name)
 Prepares a resource group in the background.
 
std::future< voidunload (const ResourcePtr &res)
 Unload a single resource in the background.
 
std::future< voidunloadResourceGroup (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 ResourceBackgroundQueuegetSingleton (void)
 Get the singleton instance.
 
static ResourceBackgroundQueuegetSingletonPtr (void)
 Get the singleton instance.
 
- Static Public Member Functions inherited from Ogre::Singleton< ResourceBackgroundQueue >
static ResourceBackgroundQueuegetSingleton (void)
 Get the singleton instance.
 
static ResourceBackgroundQueuegetSingletonPtr (void)
 Get the singleton instance.
 

Detailed Description

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.

The general approach here is that on requesting a background resource process, your request is placed on a queue ready for the background thread to be picked up, and you will get a 'ticket' back, identifying the request. Your call will then return and your thread can proceed, knowing that at some point in the background the operation will be performed. In it's own thread, the resource operation will be performed, and once finished the ticket will be marked as complete.

Constructor & Destructor Documentation

◆ ResourceBackgroundQueue()

Ogre::ResourceBackgroundQueue::ResourceBackgroundQueue ( )

◆ ~ResourceBackgroundQueue()

virtual Ogre::ResourceBackgroundQueue::~ResourceBackgroundQueue ( )
virtual

Member Function Documentation

◆ initialiseResourceGroup()

std::future< void > Ogre::ResourceBackgroundQueue::initialiseResourceGroup ( const String name)

Initialise a resource group in the background.

See also
ResourceGroupManager::initialiseResourceGroup
Parameters
nameThe name of the resource group to initialise

◆ initialiseAllResourceGroups()

std::future< void > Ogre::ResourceBackgroundQueue::initialiseAllResourceGroups ( )

Initialise all resource groups which are yet to be initialised in the background.

See also
ResourceGroupManager::intialiseResourceGroup

◆ prepareResourceGroup()

std::future< void > Ogre::ResourceBackgroundQueue::prepareResourceGroup ( const String name)

Prepares a resource group in the background.

See also
ResourceGroupManager::prepareResourceGroup
Parameters
nameThe name of the resource group to prepare

◆ loadResourceGroup()

std::future< void > Ogre::ResourceBackgroundQueue::loadResourceGroup ( const String name)

Loads a resource group in the background.

See also
ResourceGroupManager::loadResourceGroup
Parameters
nameThe name of the resource group to load

◆ unload()

std::future< void > Ogre::ResourceBackgroundQueue::unload ( const ResourcePtr res)

Unload a single resource in the background.

See also
ResourceManager::unload

◆ unloadResourceGroup()

std::future< void > Ogre::ResourceBackgroundQueue::unloadResourceGroup ( const String name)

Unloads a resource group in the background.

See also
ResourceGroupManager::unloadResourceGroup
Parameters
nameThe name of the resource group to load

◆ prepare()

std::future< void > Ogre::ResourceBackgroundQueue::prepare ( const ResourcePtr res)

Prepare a single resource in the background.

See also
ResourceManager::prepare

◆ load()

std::future< void > Ogre::ResourceBackgroundQueue::load ( const ResourcePtr res)

Load a single resource in the background.

See also
ResourceManager::load

◆ getSingleton()

static ResourceBackgroundQueue & Ogre::ResourceBackgroundQueue::getSingleton ( void  )
static

Get the singleton instance.

◆ getSingletonPtr()

static ResourceBackgroundQueue * Ogre::ResourceBackgroundQueue::getSingletonPtr ( void  )
static

Get the singleton instance.


The documentation for this class was generated from the following file: