HatchitGraphics
Public Member Functions | List of all members
Hatchit::Graphics::Texture Class Reference
Inheritance diagram for Hatchit::Graphics::Texture:

Public Member Functions

 Texture (Core::Guid ID)
 
bool Initialize (const std::string &file)
 Initialize a Texture synchronously with the GPUResourcePool. More...
 
bool InitializeAsync (Core::Handle< Texture > tempHandle, Core::Handle< Texture > defaultHandle, const std::string &file)
 Initialize a Texture asynchronously on the GPUResourceThread. More...
 
uint32_t GetWidth () const
 Gets the width of the texture. More...
 
uint32_t GetHeight () const
 Gets the height of the texture. More...
 
TextureBase *const GetBase () const
 Get a pointer to the TextureBase* that this class wraps. More...
 

Member Function Documentation

TextureBase *const Hatchit::Graphics::Texture::GetBase ( ) const

Get a pointer to the TextureBase* that this class wraps.

Returns
A TextureBase*
uint32_t Hatchit::Graphics::Texture::GetHeight ( ) const

Gets the height of the texture.

This calls down to the base member's TextureBase::GetHeight method

Returns
Returns the texture height as a uint32_t
uint32_t Hatchit::Graphics::Texture::GetWidth ( ) const

Gets the width of the texture.

This calls down to the base member's TextureBase::GetWidth method

Returns
Returns the texture width as a uint32_t
bool Hatchit::Graphics::Texture::Initialize ( const std::string &  file)

Initialize a Texture synchronously with the GPUResourcePool.

If the GPUResourceThread is already in use the texture will be created directly. If the thread is not locked we will feed the thread a request. This will LOCK the main thread until it completes.

Parameters
fileThe file path of the Texture that we want to load off the disk
Returns
a boolean representing whether or not this operation succeeded
bool Hatchit::Graphics::Texture::InitializeAsync ( Core::Handle< Texture tempHandle,
Core::Handle< Texture defaultHandle,
const std::string &  file 
)

Initialize a Texture asynchronously on the GPUResourceThread.

NON FUNCTIONING Currently we have not found a solid way to swap data into the temp handle

Parameters
tempHandleA handle that will be kept alive and which will be filled with the resulting data
defaultHandleA handle to a texture that will be used until the texture is created
fileThe file path of the texture that we want to load off the disk
Returns
a boolean representing whether or not this operation succeeded

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