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

Static Public Member Functions

static bool Initialize (IDevice *device, SwapChain *swapchain)
 Initializes the GPUResourcePool singleton class. More...
 
static void DeInitialize ()
 Destroys and released the memory used by the GPUResourcePool. More...
 
static bool IsLocked ()
 Returns true if the GPUResourcePool is locked, otherwise returns false. More...
 
static void RequestTexture (std::string file, void **data)
 Function requests the GPUResourcePool to process a non-async texture load request. More...
 
static void RequestMaterial (std::string file, void **data)
 Function requests the GPUResourcePool to process a non-async material load request. More...
 
static void RequestRootLayout (std::string file, void **data)
 Function requests the GPUResourcePool to process a non-async rootlayout load request. More...
 
static void RequestPipeline (std::string file, void **data)
 Function requests the GPUResourcePool to process a non-async pipeline load request. More...
 
static void RequestShader (std::string file, void **data)
 Function requests the GPUResourcePool to process a non-async shader load request. More...
 
static void RequestRenderPass (std::string file, void **data)
 Function requests the GPUResourcePool to process a non-async renderpass load request. More...
 
static void RequestRenderTarget (std::string file, void **data)
 Function requests the GPUResourcePool to process a non-async rendertarget load request. More...
 
static void RequestMesh (std::string file, void **data)
 Function requests the GPUResourcePool to process a non-async mesh load request. More...
 
static void RequestTextureAsync (std::string file, void **data)
 Function requests the GPUResourcePool to process an async texture load request. More...
 
static void RequestMaterialAsync (std::string file, void **data)
 Function requests the GPUResourcePool to process an async material load request. More...
 
static void RequestRootLayoutAsync (std::string file, void **data)
 Function requests the GPUResourcePool to process an async rootlayout load request. More...
 
static void RequestPipelineAsync (std::string file, void **data)
 
static void RequestShaderAsync (std::string file, void **data)
 Function requests the GPUResourcePool to process an async shader load request. More...
 
static void RequestRenderPassAsync (std::string file, void **data)
 Function requests the GPUResourcePool to process an async renderpass load request. More...
 
static void RequestRenderTargetAsync (std::string file, void **data)
 Function requests the GPUResourcePool to process an async rendertarget load request. More...
 
static void RequestMeshAsync (std::string file, void **data)
 Function requests the GPUResourcePool to process an async mesh load request. More...
 
static void CreateTexture (std::string file, void **data)
 Function creates a texture within the GPUResourcePool thread. More...
 
static void CreateMaterial (std::string file, void **data)
 Function creates a mateiral within the GPUResourcePool thread. More...
 
static void CreateRootLayout (std::string file, void **data)
 Function creates a rootlayout within the GPUResourcePool thread. More...
 
static void CreatePipeline (std::string file, void **data)
 Function creates a pipeline within the GPUResourcePool thread. More...
 
static void CreateShader (std::string file, void **data)
 Function creates a shader within the GPUResourcePool thread. More...
 
static void CreateRenderPass (std::string file, void **data)
 Function creates a renderpass within the GPUResourcePool thread. More...
 
static void CreateRenderTarget (std::string file, void **data)
 Function creates a rendertarget within the GPUResourcePool thread. More...
 
static void CreateMesh (std::string file, void **data)
 Function creates a mesg within the GPUResourcePool thread. More...
 

Member Function Documentation

void Hatchit::Graphics::GPUResourcePool::CreateMaterial ( std::string  file,
void **  data 
)
static

Function creates a mateiral within the GPUResourcePool thread.

Parameters
filePath to the material file to load.
dataPointer to the base material implementation to fill.

This function creates a material immediately on the GPUResourcePool. Generally this function should not be called, but rather you should instead use the RequestMaterial or RequestMaterialAsync functions.

The purpose of this function is to allow immediate creation of a material if we find ourselves already within the resource thread, and we know it is safe to do so.

NOTE: See ht_material.cpp for example usage.

void Hatchit::Graphics::GPUResourcePool::CreateMesh ( std::string  file,
void **  data 
)
static

Function creates a mesg within the GPUResourcePool thread.

Parameters
filePath to the mesh file to load.
dataPointer to the base mesh implementation to fill.

This function creates a mesh immediately on the GPUResourcePool. Generally this function should not be called, but rather you should instead use the RequestMesh or RequestMeshAsync functions.

The purpose of this function is to allow immediate creation of a mesg if we find ourselves already within the resource thread, and we know it is safe to do so.

NOTE: See ht_mesh.cpp for example usage.

void Hatchit::Graphics::GPUResourcePool::CreatePipeline ( std::string  file,
void **  data 
)
static

Function creates a pipeline within the GPUResourcePool thread.

Parameters
filePath to the pipeline file to load.
dataPointer to the base pipeline implementation to fill.

This function creates a pipeline immediately on the GPUResourcePool. Generally this function should not be called, but rather you should instead use the RequestPipeline or RequestPipelineAsync functions.

The purpose of this function is to allow immediate creation of a pipeline if we find ourselves already within the resource thread, and we know it is safe to do so.

NOTE: See ht_pipeline.cpp for example usage.

void Hatchit::Graphics::GPUResourcePool::CreateRenderPass ( std::string  file,
void **  data 
)
static

Function creates a renderpass within the GPUResourcePool thread.

Parameters
filePath to the renderpass file to load.
dataPointer to the base renderpass implementation to fill.

This function creates a renderpass immediately on the GPUResourcePool. Generally this function should not be called, but rather you should instead use the RequestRenderPass or RequestRenderPassAsync functions.

The purpose of this function is to allow immediate creation of a renderpass if we find ourselves already within the resource thread, and we know it is safe to do so.

NOTE: See ht_renderpass.cpp for example usage.

void Hatchit::Graphics::GPUResourcePool::CreateRenderTarget ( std::string  file,
void **  data 
)
static

Function creates a rendertarget within the GPUResourcePool thread.

Parameters
filePath to the rendertarget file to load.
dataPointer to the base rendertarget implementation to fill.

This function creates a rendertarget immediately on the GPUResourcePool. Generally this function should not be called, but rather you should instead use the RequestRenderTarget or RequestRenderTargetAsync functions.

The purpose of this function is to allow immediate creation of a rendertarget if we find ourselves already within the resource thread, and we know it is safe to do so.

NOTE: See ht_rendertarget.cpp for example usage.

void Hatchit::Graphics::GPUResourcePool::CreateRootLayout ( std::string  file,
void **  data 
)
static

Function creates a rootlayout within the GPUResourcePool thread.

Parameters
filePath to the rootlayout file to load.
dataPointer to the base rootlayout implementation to fill.

This function creates a rootlayout immediately on the GPUResourcePool. Generally this function should not be called, but rather you should instead use the RequestRootLayout or RequestRootLayoutAsync functions.

The purpose of this function is to allow immediate creation of a rootlayout if we find ourselves already within the resource thread, and we know it is safe to do so.

NOTE: See ht_rootlayout.cpp for example usage.

void Hatchit::Graphics::GPUResourcePool::CreateShader ( std::string  file,
void **  data 
)
static

Function creates a shader within the GPUResourcePool thread.

Parameters
filePath to the shader file to load.
dataPointer to the base shader implementation to fill.

This function creates a shader immediately on the GPUResourcePool. Generally this function should not be called, but rather you should instead use the RequestShader or RequestShaderAsync functions.

The purpose of this function is to allow immediate creation of a shader if we find ourselves already within the resource thread, and we know it is safe to do so.

NOTE: See ht_shader.cpp for example usage.

void Hatchit::Graphics::GPUResourcePool::CreateTexture ( std::string  file,
void **  data 
)
static

Function creates a texture within the GPUResourcePool thread.

Parameters
filePath to the texture file to load.
dataPointer to the base texture implementation to fill.

This function creates a texture immediately on the GPUResourcePool. Generally this function should not be called, but rather you should instead use the RequestTexture or RequestTextureAsync functions.

The purpose of this function is to allow immediate creation of a texture if we find ourselves already within the resource thread, and we know it is safe to do so.

NOTE: See ht_texture.cpp for example usage.

void Hatchit::Graphics::GPUResourcePool::DeInitialize ( )
static

Destroys and released the memory used by the GPUResourcePool.

This function releases the memory used by the GPUResourcePool since it is a singleton instance and must be released safely by the application.

bool Hatchit::Graphics::GPUResourcePool::Initialize ( IDevice device,
SwapChain swapchain 
)
static

Initializes the GPUResourcePool singleton class.

Parameters
deviceThe GPU device object
swapchainThe current swapchain

Initializes the GPUResourcePool instance with the device and swapchain.

NOTE: This is subject to change, as the GPUResourcePool shouldn't need to know about any specific swapchain object. In an application, there may be multiple renderers each with its own swapchain. Each of these renderers should use the same GPUResourcePool and share memory.

bool Hatchit::Graphics::GPUResourcePool::IsLocked ( )
static

Returns true if the GPUResourcePool is locked, otherwise returns false.

Due to the multithreaded nature of the GPUResourcePool, it is necessary to know if the GPUResourcePool master thread is currently locked. This function returns true if the thread is locked, otherwise it returns false;

void Hatchit::Graphics::GPUResourcePool::RequestMaterial ( std::string  file,
void **  data 
)
static

Function requests the GPUResourcePool to process a non-async material load request.

Parameters
filePath of the material file to load.
dataPointer to the material base implementation to fill.

This function requests the GPUResourcePool to process a non-asynchronous material load request. Calling this function will block the main thread until the requested material is loaded.

void Hatchit::Graphics::GPUResourcePool::RequestMaterialAsync ( std::string  file,
void **  data 
)
static

Function requests the GPUResourcePool to process an async material load request.

Parameters
filePath to material file to load.
dataPointer to the base material implementation to fill.

This function requests the GPUResourcePool to process an asynchronous material load request. Calling this function will NOT block the main thread.

void Hatchit::Graphics::GPUResourcePool::RequestMesh ( std::string  file,
void **  data 
)
static

Function requests the GPUResourcePool to process a non-async mesh load request.

Parameters
filePath of the mesh file to load.
dataPointer to the base mesh implementation to fill.

This function requests the GPUResourcePool to process a non-asynchronous mesh load request. Calling this function will block the main thread until the requested mesh is loaded.

void Hatchit::Graphics::GPUResourcePool::RequestMeshAsync ( std::string  file,
void **  data 
)
static

Function requests the GPUResourcePool to process an async mesh load request.

Parameters
filePath to the mesh file to load
dataPointer to the base mesh implementation to fill.

This function requests the GPUResourcePool to process an asynchronous mesh load request. Calling this function will NOT block the main thread.

void Hatchit::Graphics::GPUResourcePool::RequestPipeline ( std::string  file,
void **  data 
)
static

Function requests the GPUResourcePool to process a non-async pipeline load request.

Parameters
filePath of the pipeline file to load.
dataPointer to the pipeline base implementation to fill.

This function requestts the GPUResourcePool to process a non-asynchronous pipeline load request. Calling this function will block the main thread until the requested pipeline is loaded.

void Hatchit::Graphics::GPUResourcePool::RequestRenderPass ( std::string  file,
void **  data 
)
static

Function requests the GPUResourcePool to process a non-async renderpass load request.

Parameters
filePath of the renderpass file to load.
dataPointer to the renderpass base implementation to fill.

This function requests the GPUResourcePool to process a non-asynchronous renderpass load request. Calling this function will block the main thread until the requested renderpass is loaded.

void Hatchit::Graphics::GPUResourcePool::RequestRenderPassAsync ( std::string  file,
void **  data 
)
static

Function requests the GPUResourcePool to process an async renderpass load request.

Parameters
filePath to renderpass file to load.
dataPointer to the base renderpass implementation to fill.

This function requests the GPUResourcePool to process an asynchronous shader load request. Calling this function will NOT block the main thread.

void Hatchit::Graphics::GPUResourcePool::RequestRenderTarget ( std::string  file,
void **  data 
)
static

Function requests the GPUResourcePool to process a non-async rendertarget load request.

Parameters
filePath of the rendertarget file to load.
dataPointer to base rendertarget implementation to fill.

This function requests the GPUResourcePool to process a non-asynchronous rendertarget load request. Calling this function will block the main thread until the requested rendertarget is loaded.

void Hatchit::Graphics::GPUResourcePool::RequestRenderTargetAsync ( std::string  file,
void **  data 
)
static

Function requests the GPUResourcePool to process an async rendertarget load request.

Parameters
filePath to the renderpass file to load.
dataPointer to the base rendertarget implementation to fill.

This function requests the GPUResourcePool to process an asynchronous rendertarget load request. Calling this function will NOT block the main thread.

void Hatchit::Graphics::GPUResourcePool::RequestRootLayout ( std::string  file,
void **  data 
)
static

Function requests the GPUResourcePool to process a non-async rootlayout load request.

Parameters
filePath of the rootlayout file to load.
dataPointer to the rootlayout base implementation to fill.

This function requests the GPUResourcePool to process a non-asynchronous rootlayout load request. Calling this function will block the main thread until the requested rootlayout is loaded.

void Hatchit::Graphics::GPUResourcePool::RequestRootLayoutAsync ( std::string  file,
void **  data 
)
static

Function requests the GPUResourcePool to process an async rootlayout load request.

Parameters
filePath to the rootlayout file to load.
dataPointer to the base rootlayout implementation to fill.

This function requests the GPUResourcePool to process an asynchronous rootlayout load request. Calling this function will NOT block the main thread.

void Hatchit::Graphics::GPUResourcePool::RequestShader ( std::string  file,
void **  data 
)
static

Function requests the GPUResourcePool to process a non-async shader load request.

Parameters
filePath of the shader file to load.
dataPointer to the shader base implementation to fill.

This function requests the GPUResourcePool to process a non-asynchronous shader load request. Calling this function will block the main thread until the requested shader is loaded.

void Hatchit::Graphics::GPUResourcePool::RequestShaderAsync ( std::string  file,
void **  data 
)
static

Function requests the GPUResourcePool to process an async shader load request.

Parameters
filePath to the shader file to load.
dataPointer to the base shader implementation to fill.

This function requests the GPUResourcePool to process an asynchronous shader load request. Calling this function will NOT block the main thread.

void Hatchit::Graphics::GPUResourcePool::RequestTexture ( std::string  file,
void **  data 
)
static

Function requests the GPUResourcePool to process a non-async texture load request.

Parameters
filePath of the texture file to load
dataPointer to texture base implementation to fill.

This function requests the GPUResourcePool to process a non-asynchronous texture load request. Calling this function will block the main thread until the requested texture is loaded.

void Hatchit::Graphics::GPUResourcePool::RequestTextureAsync ( std::string  file,
void **  data 
)
static

Function requests the GPUResourcePool to process an async texture load request.

Parameters
filePath of texture file to load.
dataPointer to the base texture implementation to fill.

This function requests the GPUResourcePool to process an asynchronous texture load request. Calling this function will NOT block the main thread.


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