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

Public Member Functions

 RenderPass (Core::Guid ID)
 
bool Initialize (const std::string &file)
 Initialize a RenderPass synchronously with the GPUResourcePool. More...
 
bool BuildCommandList (const ICommandPool *commandPool)
 Build a command list with the given command pool. More...
 
void SetView (Math::Matrix4 view)
 Set the view matrix to be used in this render pass. More...
 
void SetProj (Math::Matrix4 proj)
 Set the projection matrix to be used in this render pass. More...
 
void ScheduleRenderRequest (MaterialHandle material, MeshHandle mesh, ShaderVariableChunk *instanceVariables)
 Schedule a render request on this render pass. More...
 
uint64_t GetLayerFlags ()
 Gets the layers that this RenderPassBase is a part of. More...
 
RenderPassBase *const GetBase () const
 

Member Function Documentation

bool RenderPass::BuildCommandList ( const ICommandPool commandPool)

Build a command list with the given command pool.

Given an interface to a command pool, record all the necesary commands to render this render pass onto a command list.

Parameters
commandPoolA pointer to the command pool to build the command list from
Returns
A boolean representing whether or not this operation succeeded
uint64_t RenderPass::GetLayerFlags ( )

Gets the layers that this RenderPassBase is a part of.

Returns
A uint64_t bitfield of the layers that this is a part of
bool RenderPass::Initialize ( const std::string &  file)

Initialize a RenderPass 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 RenderPass json file that we want to load off the disk
Returns
A boolean representing whether or not this operation succeeded
void RenderPass::ScheduleRenderRequest ( MaterialHandle  material,
MeshHandle  mesh,
ShaderVariableChunk instanceVariables 
)

Schedule a render request on this render pass.

Provide a material, mesh and any instance data you want and that object will be rendered in a command as part of this pass. The data will be sorted and built later.

Parameters
materialA handle to the material you want to render with
meshA handle to the mesh you want to render
instanceVariablesAny instance level variables required for rendering
void RenderPass::SetProj ( Math::Matrix4  proj)

Set the projection matrix to be used in this render pass.

Parameters
projThe Math::Matrix4 to be used for the projection matrix
void RenderPass::SetView ( Math::Matrix4  view)

Set the view matrix to be used in this render pass.

Parameters
viewThe Math::Matrix4 to be used for the view matrix

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