class
render::RendererUtility
Contains various utility methods that make various common operations in the renderer easier.
Public
Constructors
RendererUtility
Methods
~RendererUtility
SetPass
Activates the specified material pass for rendering.
Any further draw calls will be executed using this pass.
- commandBuffer
- Command buffer to bind the material pass to.
- material
- Material containing the pass.
- passIndex
- Index of the pass in the material.
- variationIndex
- Index of the variation the pass belongs to, if the material has multiple variations.
SetComputePass
Activates the specified material pass for compute.
Any further dispatch calls will be executed using this pass.
- commandBuffer
- Command buffer to bind the pass to.
- material
- Material containing the pass.
- passIndex
- Index of the pass in the material.
SetPassParams
Sets parameters (textures, samplers, buffers) for the currently active pass.
- commandBuffer
- Command buffer to bind the pass parameters to.
- adapter
- Object containing the parameters.
- passIndex
- Pass for which to set the parameters.
Draw
Draws the specified mesh.
- commandBuffer
- Command buffer to encode the draw command on.
- mesh
- Mesh to draw.
- instanceCount
- Number of times to draw the mesh using instanced rendering.
Draw
Draws the specified mesh.
- commandBuffer
- Command buffer to encode the draw command on.
- mesh
- Mesh to draw.
- subMesh
- Portion of the mesh to draw.
- instanceCount
- Number of times to draw the mesh using instanced rendering.
DrawMorph
Draws the specified mesh with an additional vertex buffer containing morph shape vertices.
- commandBuffer
- Command buffer to encode the draw command on.
- mesh
- Mesh to draw.
- subMesh
- Portion of the mesh to draw.
- morphVertices
- Buffer containing the morph shape vertices. Will be bound to stream 1. Expected to contain the same number of vertices as the source mesh.
- morphVertexDescription
- Object describing vertices of the provided mesh and the vertices provided in the morph vertex buffer.
Blit
Blits a source texture to a render target with optional filtering, blending, and coordinate transformations.
This method encapsulates the complete blit operation including render pass management and viewport setup.
- commandBuffer
- Command buffer to record the blit operation into.
- blitInformation
- Structure containing all blit parameters (source/destination, areas, options).
DrawScreenQuad
Draws a quad over the entire viewport in normalized device coordinates.
- commandBuffer
- Command buffer to encode the draw command on.
- uv
- UV coordinates to assign to the corners of the quad.
- textureSize
- Size of the texture the UV coordinates are specified for. If the UV coordinates are already in normalized (0, 1) range then keep this value as is. If the UV coordinates are in texels then set this value to the texture size so they can be normalized internally.
- numInstances
- How many instances of the quad to draw (using instanced rendering). Useful when drawing to 3D textures.
- flipUV
- If true, vertical UV coordinate will be flipped upside down.
DrawScreenQuad
Draws a quad over the entire viewport in normalized device coordinates.
- commandBuffer
- Command buffer to encode the draw command on.
- numInstances
- How many instances of the quad to draw (using instanced rendering). Useful when drawing to 3D textures.
Clear
Clears the currently bound render target to the provided integer value.
This is similar to RenderAPI::clearRenderTarget(), except it supports integer clears.
GetSpotLightStencil
Returns a stencil mesh used for a spot light.
Actual vertex positions need to be computed in shader as this method will return uninitialized vertex positions.
GetSkyBoxMesh
Returns a mesh that can be used for rendering a skybox.
staticInstance
Returns a reference to the module instance.
Module has to have been started up first otherwise an exception will be thrown.
staticInstancePtr
Returns a pointer to the module instance.
Module has to have been started up first otherwise an exception will be thrown.
staticShutDown
Shuts down this module and frees any resources it is using.
staticIsStarted
Query if the module has been started.
Protected
Methods
~Module<T>
OnStartUp
Override if you want your module to be notified once it has been constructed and started.
OnShutDown
Override if you want your module to be notified just before it is deleted.
staticInstanceInternal
Returns a singleton instance of this module.