Ocular Engine
|
Base class for all texture objects. More...
#include <Texture.hpp>
Public Member Functions | |
Texture (TextureDescriptor const &descriptor) | |
virtual void | unload ()=0 |
virtual void | apply ()=0 |
virtual void | refresh ()=0 |
TextureDescriptor | getDescriptor () const |
Public Member Functions inherited from Ocular::Core::Resource | |
Resource (File const &source) | |
virtual void | forceLoad () |
File | getSourceFile () const |
void | setSourceFile (File const &file) |
void | setIsInMemory (bool inMemory) |
bool | isInMemory () const |
void | setSize (uint64_t size) |
uint64_t | getSize () const |
ResourceType | getResourceType () const |
void | setName (std::string const &name) |
std::string const & | getName () const |
std::string const & | getMappingName () const |
void | setMappingName (std::string const &name) |
ResourceMetadata * | getMetadata () const |
void | setMetadata (ResourceMetadata *metadata) |
Protected Attributes | |
TextureDescriptor | m_Descriptor |
Protected Attributes inherited from Ocular::Core::Resource | |
ResourceType | m_Type |
ResourceMetadata * | m_Metadata |
File | m_SourceFile |
bool | m_IsInMemory |
uint64_t | m_SizeInMemory |
std::string | m_Name |
std::string | m_MappingName |
Base class for all texture objects.
Ocular::Graphics::Texture::Texture | ( | TextureDescriptor const & | descriptor | ) |
[in] | descriptor |
|
pure virtual |
Applies any manually made pixel changes of the texture to the GPU. Textures will not be updated (i.e. changes rendered) until this method is called.
Implemented in Ocular::Graphics::D3D11RenderTexture, Ocular::Graphics::Texture2D, Ocular::Graphics::D3D11DepthTexture, Ocular::Graphics::DepthTexture, Ocular::Graphics::RenderTexture, and Ocular::Graphics::D3D11Texture2D.
TextureDescriptor Ocular::Graphics::Texture::getDescriptor | ( | ) | const |
Returns a copy of the texture descriptor that defines this texture resource.
|
pure virtual |
Refreshes the CPU texture data with any data stored on the GPU. This action can overwrite pre-existing CPU data.
Implemented in Ocular::Graphics::D3D11RenderTexture, Ocular::Graphics::Texture2D, Ocular::Graphics::D3D11DepthTexture, Ocular::Graphics::DepthTexture, Ocular::Graphics::RenderTexture, and Ocular::Graphics::D3D11Texture2D.
|
pure virtual |
Frees all memory used by this Resource.
Reimplemented from Ocular::Core::Resource.
Implemented in Ocular::Graphics::D3D11RenderTexture, Ocular::Graphics::Texture2D, Ocular::Graphics::D3D11DepthTexture, Ocular::Graphics::DepthTexture, Ocular::Graphics::RenderTexture, and Ocular::Graphics::D3D11Texture2D.