Abstract class that defines and implements functions for creation of GPU resource objects.
More...
#include <ht_gpuresourcethread.h>
|
std::thread | m_thread |
|
std::atomic_bool | m_alive |
|
std::atomic_bool | m_tfinished |
|
std::atomic_bool | m_locked |
|
std::mutex | m_mutex |
|
std::condition_variable | m_cv |
|
std::atomic_bool | m_processed |
|
GPURequestQueue | m_requests |
|
Abstract class that defines and implements functions for creation of GPU resource objects.
This class defines the logic for the GPU resource thread owned by GPUResourcePool, for the loading and creation of GPU resource objects.
void Hatchit::Graphics::GPUResourceThread::CreateMaterial |
( |
std::string |
file, |
|
|
void ** |
data |
|
) |
| |
Function creates a material.
- Parameters
-
file | Path of material file to load. |
data | Pointer to the base material implementation to load. |
This function will create a materia object on the GPU resource thread.
void Hatchit::Graphics::GPUResourceThread::CreateMesh |
( |
std::string |
file, |
|
|
void ** |
data |
|
) |
| |
Function creates a mesh.
- Parameters
-
file | Path to the mesh file to load. |
data | Pointer to the base mesh implementation to fill. |
This function will create a mesh object on the GPU resource thread.
void Hatchit::Graphics::GPUResourceThread::CreatePipeline |
( |
std::string |
file, |
|
|
void ** |
data |
|
) |
| |
Function creates a pipeline.
- Parameters
-
file | Path to pipeline file to load. |
data | Pointer to base pipeline implementation to fill. |
This function will create a pipeline object on the GPU resource thread.
void Hatchit::Graphics::GPUResourceThread::CreateRenderPass |
( |
std::string |
file, |
|
|
void ** |
data |
|
) |
| |
Function creates a renderpass.
- Parameters
-
file | Path to renderpass file to load. |
data | Pointer to the base renderpass implementation to fill. |
This function will create a renderpass object on the GPU resource thread.
void Hatchit::Graphics::GPUResourceThread::CreateRenderTarget |
( |
std::string |
file, |
|
|
void ** |
data |
|
) |
| |
Function creates a rendertarget.
- Parameters
-
file | Path to rendertarget file to load. |
data | Pointer to the base rendertarget implementation to fill. |
This function will create a rendertarget object on the GPU resource thread.
void Hatchit::Graphics::GPUResourceThread::CreateRootLayout |
( |
std::string |
file, |
|
|
void ** |
data |
|
) |
| |
Function creates a rootlayout.
- Parameters
-
file | Path to rootlayout file to load. |
data | Pointer to the base rootlayout implementation to fill. |
This function will create a rootlayout object on the GPU resource thread.
void Hatchit::Graphics::GPUResourceThread::CreateShader |
( |
std::string |
file, |
|
|
void ** |
data |
|
) |
| |
Function creates a shader.
- Parameters
-
file | Path to shader file to load. |
data | Pointer to the base shader implementation to fill. |
This function will create a shader object on the GPU resource thread.
void Hatchit::Graphics::GPUResourceThread::CreateTexture |
( |
std::string |
file, |
|
|
void ** |
data |
|
) |
| |
Function creates a texture.
- Parameters
-
file | Path of texture file to load. |
data | Pointer to the base texture implementation to fill. |
This function will create a texture object on the GPU resource thread.
void Hatchit::Graphics::GPUResourceThread::Kill |
( |
| ) |
|
Function kills the thread.
This function will kill the thread and join until finished.
Function processes a non-async GPUResourceRequest.
- Parameters
-
This function will process a GPUResourceRequest non-asynchronously by pushing the request onto the request stack and then blocking the main thread for processing.
Function processes an async GPUResourceRequest.
- Parameters
-
request | Pointer to GPUResourceRequet object |
This function will process a GPUResourceRequest asynchronously by pushing the request onto the request stack. It does NOT block the main thread, but loads asynchronously instead.
bool Hatchit::Graphics::GPUResourceThread::Locked |
( |
| ) |
const |
Function returns if thread is locked.
- Returns
- m_locked True if thread is locked, otherwise false.
The function returns true if the thread is currently in a locked state, otherwise it returns false.
NOTE: A GPUResourceThread is usually in a locked state due to a non-async resource request.
void Hatchit::Graphics::GPUResourceThread::ProcessMaterialRequest |
( |
MaterialRequest * |
request | ) |
|
|
protected |
Function processes a material request.
- Parameters
-
request | Pointer to MaterialRequest. |
This function will process a MaterialRequest and create the material either non-async or async depending on the state of the GPU resource thread.
void Hatchit::Graphics::GPUResourceThread::ProcessMeshRequest |
( |
MeshRequest * |
request | ) |
|
|
protected |
Function processes a mesh request.
- Parameters
-
request | Pointer to MeshRequest |
This function will process a MeshRequest and create the mesh either non-async or async depending on the state of the GPU resource thread.
void Hatchit::Graphics::GPUResourceThread::ProcessPipelineRequest |
( |
PipelineRequest * |
request | ) |
|
|
protected |
Function processes a pipeline request.
- Parameters
-
request | Pointer to PipelineRequest |
This function will process a PipelineRequst and create the pipeline either non-async or asycn depending on the state of the GPU resource thread.
void Hatchit::Graphics::GPUResourceThread::ProcessRenderPassRequest |
( |
RenderPassRequest * |
request | ) |
|
|
protected |
Function processes a renderpass request.
- Parameters
-
request | Pointer to RenderPassRequest |
This function will process a RenderPassRequest and create the renderpass either non-async or async depending on the state of the GPU resource thread.
void Hatchit::Graphics::GPUResourceThread::ProcessRenderTargetRequest |
( |
RenderTargetRequest * |
request | ) |
|
|
protected |
Function processes a rendertarget request.
- Parameters
-
request | Pointer to RenderTargetRequest |
This function will process a RenderTargetRequest and create the rendertarget either non-async or async depending on the state of the GPU resource thread.
void Hatchit::Graphics::GPUResourceThread::ProcessRootLayoutRequest |
( |
RootLayoutRequest * |
request | ) |
|
|
protected |
Function processes a rootlayout request.
- Parameters
-
request | Pointer to RootLayoutRequest. |
This function will process a RootLayoutRequest and create the rootlayout either non-async or asycn depending on the state of the GPU resource thread.
void Hatchit::Graphics::GPUResourceThread::ProcessShaderRequest |
( |
ShaderRequest * |
request | ) |
|
|
protected |
Function processes a shader request.
- Parameters
-
request | Pointer to ShaderRequest |
This function will process a ShaderRequest and create the shader either non-async or async depending on the state of the GPU resource thread.
void Hatchit::Graphics::GPUResourceThread::ProcessTextureRequest |
( |
TextureRequest * |
request | ) |
|
|
protected |
Function processes a texture request.
- Parameters
-
request | Pointer to TextureRequest. |
This function will process a TextureRequest and create the texture either non-async or async depending on the state of the GPU resource thread.
The documentation for this class was generated from the following files: