#include <OgreResource.h>
Inheritance diagram for Ogre::Resource:
Public Methods | |
Resource () | |
Basic constructor. | |
virtual | ~Resource () |
Virtual destructor. | |
virtual void | load ()=0 |
Loads the resource, if it is not already. | |
virtual void | unload () |
Unloads the resource, but retains data to recreate. | |
virtual size_t | getSize (void) const |
Retrieves info about the size of the resource. | |
virtual void | touch (void) |
'Touches' the resource to indicate it has been used. | |
time_t | getLastAccess (void) const |
Gets the last time the resource was 'touched'. | |
const String & | getName (void) const |
Gets resource name. | |
ResourceHandle | getHandle (void) const |
bool | isLoaded (void) const |
Returns true if the Resource has been loaded, false otherwise. | |
virtual void | destroy () |
A method to make the resource delete itself. | |
Protected Attributes | |
String | mName |
ResourceHandle | mHandle |
bool | mIsLoaded |
time_t | mLastAccess |
size_t | mSize |
Friends | |
class | ResourceManager |
textures, sounds etc)
Subclasses must implement: 1. A constructor, with at least a mandatory name param. This constructor must set mName and optionally mSize. 2. The load() and unload() methods - mSize must be set after load() Each must check & update the mIsLoaded flag.
Definition at line 52 of file OgreResource.h.
|
Basic constructor. @warn Subclasses must init mName, mHandle and mSize! Definition at line 67 of file OgreResource.h. |
|
Virtual destructor. Shouldn't need to be overloaded, as the resource deallocation code should reside in unload()
Definition at line 77 of file OgreResource.h. |
|
A method to make the resource delete itself.
Definition at line 137 of file OgreResource.h. |
|
Definition at line 120 of file OgreResource.h. References Ogre::ResourceHandle. Referenced by Ogre::Material::clone(), Ogre::BspLevel::loadQuake3Level(), and Ogre::ResourceManager::unload(). |
|
Gets the last time the resource was 'touched'.
Definition at line 108 of file OgreResource.h. |
|
|
Retrieves info about the size of the resource.
Definition at line 93 of file OgreResource.h. Referenced by Ogre::ResourceManager::unload(). |
|
Returns true if the Resource has been loaded, false otherwise.
Definition at line 127 of file OgreResource.h. Referenced by Ogre::GpuProgramUsage::_load(), Ogre::SceneManager::deriveShadowCasterPass(), Ogre::SceneManager::deriveShadowReceiverPass(), Ogre::Technique::isLoaded(), Ogre::D3D9Texture::load(), Ogre::D3D9Texture::unload(), and Ogre::D3D9Texture::~D3D9Texture(). |
|
Loads the resource, if it is not already.
Implemented in Ogre::ArchiveEx, Ogre::DynLib, Ogre::Font, Ogre::GpuProgram, Ogre::HighLevelGpuProgram, Ogre::Material, Ogre::Mesh, Ogre::Overlay, Ogre::PatchMesh, Ogre::Skeleton, Ogre::SkeletonInstance, Ogre::StringResource, Ogre::Zip, Ogre::BspLevel, Ogre::Quake3Shader, Ogre::D3DTexture, Ogre::D3D9GpuProgram, Ogre::D3D9Texture, and Ogre::GLTexture. Referenced by Ogre::ResourceManager::load(). |
|
'Touches' the resource to indicate it has been used.
Reimplemented in Ogre::Material. Definition at line 100 of file OgreResource.h. Referenced by Ogre::Mesh::clone(), Ogre::MeshManager::createCurvedIllusionPlane(), Ogre::MeshManager::createCurvedPlane(), Ogre::MeshManager::createPlane(), and Ogre::ResourceManager::load(). |
|
Unloads the resource, but retains data to recreate.
Reimplemented in Ogre::ArchiveEx, Ogre::DynLib, Ogre::Font, Ogre::HighLevelGpuProgram, Ogre::Material, Ogre::Mesh, Ogre::Overlay, Ogre::Skeleton, Ogre::SkeletonInstance, Ogre::Zip, Ogre::BspLevel, Ogre::Quake3Shader, Ogre::D3DTexture, Ogre::D3D9GpuVertexProgram, Ogre::D3D9GpuFragmentProgram, Ogre::D3D9Texture, Ogre::GLGpuNvparseProgram, Ogre::GLArbGpuProgram, and Ogre::GLTexture. Definition at line 89 of file OgreResource.h. Referenced by Ogre::GpuProgram::load(), Ogre::D3D9GpuProgram::load(), Ogre::ResourceManager::unload(), Ogre::HighLevelGpuProgram::unload(), and Ogre::D3D7RenderTexture::~D3D7RenderTexture(). |
|
Definition at line 54 of file OgreResource.h. |
|
Definition at line 57 of file OgreResource.h. Referenced by Ogre::ResourceManager::add(), Ogre::Material::clone(), Ogre::Material::copyDetailsTo(), and Ogre::Material::operator=(). |
|
|
Definition at line 59 of file OgreResource.h. Referenced by Ogre::Material::operator=(). |
|
|
Definition at line 60 of file OgreResource.h. Referenced by Ogre::D3D9Texture::_setFinalAttributes(), Ogre::D3DTexture::loadImage(), Ogre::D3DTexture::loadImage3D(), Ogre::GLTexture::loadImages(), and Ogre::Material::operator=(). |
Copyright © 2002-2003 by The OGRE Team
Last modified Fri May 14 23:27:04 2004