Hymn to Beauty
C++ 3D Engine
Video::StaticRenderProgram Class Reference

Render program to render an entity using default shader program. More...

#include <StaticRenderProgram.hpp>

Inheritance diagram for Video::StaticRenderProgram:
Video::RenderProgram

Public Member Functions

 StaticRenderProgram (LowLevelRenderer *lowLevelRenderer)
 Create new static render program. More...
 
 ~StaticRenderProgram ()
 Destructor. More...
 
void PreDepthRender (CommandBuffer &commandBuffer, const glm::mat4 &viewMatrix, const glm::mat4 &projectionMatrix)
 Bind depth render program. More...
 
void DepthRender (CommandBuffer &commandBuffer, Geometry::Geometry3D *geometry, const glm::mat4 &modelMatrix) const
 Render depth pass. More...
 
void PreRender (CommandBuffer &commandBuffer, const glm::mat4 &viewMatrix, const glm::mat4 &projectionMatrix, const ZBinning::LightInfo &lightInfo)
 Bind render program. More...
 
void Render (CommandBuffer &commandBuffer, Geometry::Geometry3D *geometry, Video::Texture2D *textureAlbedo, Video::Texture2D *textureNormal, Video::Texture2D *textureRoughnessMetallic, const glm::mat4 &modelMatrix) const
 Render mesh. More...
 
- Public Member Functions inherited from Video::RenderProgram
 RenderProgram ()
 Constructor. More...
 
virtual ~RenderProgram ()
 Destructor. More...
 
void SetGamma (float gamma)
 Gamma correction. More...
 
float GetGamma () const
 Gamma correction. More...
 

Additional Inherited Members

- Protected Attributes inherited from Video::RenderProgram
float gamma = 2.2f
 

Detailed Description

Render program to render an entity using default shader program.

Constructor & Destructor Documentation

◆ StaticRenderProgram()

StaticRenderProgram::StaticRenderProgram ( LowLevelRenderer lowLevelRenderer)
explicit

Create new static render program.

Parameters
lowLevelRendererThe low-level renderer to use.

◆ ~StaticRenderProgram()

StaticRenderProgram::~StaticRenderProgram ( )

Destructor.

Member Function Documentation

◆ DepthRender()

void StaticRenderProgram::DepthRender ( CommandBuffer commandBuffer,
Geometry::Geometry3D geometry,
const glm::mat4 &  modelMatrix 
) const

Render depth pass.

Parameters
commandBufferCommand buffer to build commands into.
geometryThe geometry to render.
modelMatrixModel matrix.

◆ PreDepthRender()

void StaticRenderProgram::PreDepthRender ( CommandBuffer commandBuffer,
const glm::mat4 &  viewMatrix,
const glm::mat4 &  projectionMatrix 
)

Bind depth render program.

Parameters
commandBufferCommand buffer to build commands into.
viewMatrixThe camera's view matrix.
projectionMatrixThe camera's projection matrix.

◆ PreRender()

void StaticRenderProgram::PreRender ( CommandBuffer commandBuffer,
const glm::mat4 &  viewMatrix,
const glm::mat4 &  projectionMatrix,
const ZBinning::LightInfo lightInfo 
)

Bind render program.

Parameters
commandBufferCommand buffer to build commands into.
viewMatrixThe camera's view matrix.
projectionMatrixThe camera's projection matrix.
lightInfoInformation about the lights in the scene.

◆ Render()

void StaticRenderProgram::Render ( CommandBuffer commandBuffer,
Geometry::Geometry3D geometry,
Video::Texture2D textureAlbedo,
Video::Texture2D textureNormal,
Video::Texture2D textureRoughnessMetallic,
const glm::mat4 &  modelMatrix 
) const

Render mesh.

Parameters
commandBufferCommand buffer to build commands into.
geometryThe geometry to render.
textureAlbedoAlbedo texture.
textureNormalNormal texture.
textureRoughnessMetallicRoughness-metallic texture.
modelMatrixModel matrix.

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