HatchitGraphics
|
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... | |
TextureBase *const Hatchit::Graphics::Texture::GetBase | ( | ) | const |
Get a pointer to the TextureBase* that this class wraps.
uint32_t Hatchit::Graphics::Texture::GetHeight | ( | ) | const |
Gets the height of the texture.
This calls down to the base member's TextureBase::GetHeight method
uint32_t Hatchit::Graphics::Texture::GetWidth | ( | ) | const |
Gets the width of the texture.
This calls down to the base member's TextureBase::GetWidth method
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.
file | The file path of the Texture that we want to load off the disk |
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
tempHandle | A handle that will be kept alive and which will be filled with the resulting data |
defaultHandle | A handle to a texture that will be used until the texture is created |
file | The file path of the texture that we want to load off the disk |