|
ResourceType | m_Type |
|
ResourceMetadata * | m_Metadata |
|
File | m_SourceFile |
|
bool | m_IsInMemory |
|
uint64_t | m_SizeInMemory |
|
std::string | m_Name |
|
std::string | m_MappingName |
|
Ocular::Core::Resource::Resource |
( |
File const & |
source | ) |
|
- Parameters
-
[in] | file | The source file for the resource. |
void Ocular::Core::Resource::forceLoad |
( |
| ) |
|
|
virtual |
Forces this Resource to be loaded into memory.
- Todo:
- Resources forceLoad
std::string const & Ocular::Core::Resource::getMappingName |
( |
| ) |
const |
- Returns
- The mapping name used to find the resource. This is typically the relative local path without the file extension.
- Returns
- Optional metadata that was set for this Resource. Returns NULL if no metadata set.
ResourceType Ocular::Core::Resource::getResourceType |
( |
| ) |
const |
- Returns
- The type of resource.
uint64_t Ocular::Core::Resource::getSize |
( |
| ) |
const |
- Returns
- The size, in bytes, of the Resource
File Ocular::Core::Resource::getSourceFile |
( |
| ) |
const |
- Returns
- The source file for the resource.
bool Ocular::Core::Resource::isInMemory |
( |
| ) |
const |
- Returns
- TRUE if the Resource is loaded in memory.
void Ocular::Core::Resource::setIsInMemory |
( |
bool |
inMemory | ) |
|
- Parameters
-
- Note
- This method should generally not be used unless by internal mechanisms.
void Ocular::Core::Resource::setMappingName |
( |
std::string const & |
name | ) |
|
- Note
- For internal use only
Sets the optional metadata for this Resource.
The Resource assumes ownership of the metadata and will delete it either at the end of it's lifetime, or during subsequent calls to this methods.
- Parameters
-
void Ocular::Core::Resource::setSize |
( |
uint64_t |
size | ) |
|
Sets the size in bytes that this resource occupies when loaded.
- Parameters
-
void Ocular::Core::Resource::setSourceFile |
( |
File const & |
file | ) |
|
- Parameters
-
- Note
- This method should generally not be used unless by internal mechanisms.
void Ocular::Core::Resource::unload |
( |
| ) |
|
|
virtual |
Frees all memory used by this Resource.
Reimplemented in Ocular::Graphics::Mesh, Ocular::Graphics::Material, Ocular::Graphics::D3D11RenderTexture, Ocular::Graphics::Texture2D, Ocular::Graphics::D3D11DepthTexture, Ocular::Graphics::MeshEmpty, Ocular::Graphics::MeshMissing, Ocular::Graphics::ShaderProgram, Ocular::Graphics::Texture, Ocular::Graphics::D3D11VertexShader, Ocular::Graphics::MaterialEmpty, Ocular::Graphics::MaterialMissing, Ocular::Graphics::Shader, Ocular::Graphics::DepthTexture, Ocular::Graphics::RenderTexture, Ocular::Graphics::D3D11FragmentShader, Ocular::Graphics::D3D11GeometryShader, Ocular::Graphics::D3D11PostTessellationShader, Ocular::Graphics::D3D11PreTessellationShader, Ocular::Graphics::FragmentShader, Ocular::Graphics::GeometryShader, Ocular::Graphics::PostTessellationShader, Ocular::Graphics::PreTessellationShader, Ocular::Graphics::VertexShader, and Ocular::Graphics::D3D11Texture2D.
The documentation for this class was generated from the following files:
- C:/Projects/OcularEngine/OcularCore/include/Resources/Resource.hpp
- C:/Projects/OcularEngine/OcularCore/src/Resources/Resource.cpp