OGRE-Next  2.3
Object-Oriented Graphics Rendering Engine
Ogre::ResourceLoadingListener Class Referenceabstract

#include <OgreResourceGroupManager.h>

Public Member Functions

virtual ~ResourceLoadingListener ()
 
virtual bool grouplessResourceExists (const String &name)=0
 Gets called when a groupless manager (like TextureGpuManager) wants to check if there's a resource with that name provided by this listener. More...
 
virtual DataStreamPtr grouplessResourceLoading (const String &name)=0
 Gets called when a groupless manager (like TextureGpuManager) loads a resource. More...
 
virtual DataStreamPtr grouplessResourceOpened (const String &name, Archive *archive, DataStreamPtr &dataStream)=0
 Similar to resourceStreamOpened, gets called when a groupless manager has already opened a resource and you may want to modify the stream. More...
 
virtual bool resourceCollision (Resource *resource, ResourceManager *resourceManager)=0
 This event is called when a resource collides with another existing one in a resource manager. More...
 
virtual DataStreamPtr resourceLoading (const String &name, const String &group, Resource *resource)=0
 This event is called when a resource beings loading. More...
 
virtual void resourceStreamOpened (const String &name, const String &group, Resource *resource, DataStreamPtr &dataStream)=0
 This event is called when a resource stream has been opened, but not processed yet. More...
 

Detailed Description

Remarks
This class allows users to override resource loading behavior. By overriding this class' methods, you can change how resources are loaded and the behavior for resource name collisions.

Constructor & Destructor Documentation

◆ ~ResourceLoadingListener()

virtual Ogre::ResourceLoadingListener::~ResourceLoadingListener ( )
virtual

Member Function Documentation

◆ grouplessResourceExists()

virtual bool Ogre::ResourceLoadingListener::grouplessResourceExists ( const String name)
pure virtual

Gets called when a groupless manager (like TextureGpuManager) wants to check if there's a resource with that name provided by this listener.

This function is called from main thread.

◆ grouplessResourceLoading()

virtual DataStreamPtr Ogre::ResourceLoadingListener::grouplessResourceLoading ( const String name)
pure virtual

Gets called when a groupless manager (like TextureGpuManager) loads a resource.

WARNING: This function is likely going to be called from a worker thread.

◆ grouplessResourceOpened()

virtual DataStreamPtr Ogre::ResourceLoadingListener::grouplessResourceOpened ( const String name,
Archive archive,
DataStreamPtr dataStream 
)
pure virtual

Similar to resourceStreamOpened, gets called when a groupless manager has already opened a resource and you may want to modify the stream.

If grouplessResourceLoading has been called, then this function won't. WARNING: This function is likely going to be called from a worker thread.

◆ resourceCollision()

virtual bool Ogre::ResourceLoadingListener::resourceCollision ( Resource resource,
ResourceManager resourceManager 
)
pure virtual

This event is called when a resource collides with another existing one in a resource manager.

◆ resourceLoading()

virtual DataStreamPtr Ogre::ResourceLoadingListener::resourceLoading ( const String name,
const String group,
Resource resource 
)
pure virtual

This event is called when a resource beings loading.

◆ resourceStreamOpened()

virtual void Ogre::ResourceLoadingListener::resourceStreamOpened ( const String name,
const String group,
Resource resource,
DataStreamPtr dataStream 
)
pure virtual

This event is called when a resource stream has been opened, but not processed yet.

Remarks
You may alter the stream if you wish or alter the incoming pointer to point at another stream if you wish.

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