Rendu
A lightweight rendering engine for experimentations
Loading...
Searching...
No Matches
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
DebugRenderer Class Referencefinal

Provide debuggging visualization for most scene elements. More...

#include <DebugRenderer.hpp>

Public Member Functions

 DebugRenderer ()
 
void setScene (const std::shared_ptr< Scene > &scene)
 
void draw (const Camera &camera, Texture *dstColor, Texture *dstDepth, uint layer=0) override
 
void interface () override
 
- Public Member Functions inherited from Renderer
 Renderer (const std::string &name)
 
virtual void draw (const Camera &camera, Texture *dstColor, Texture *dstDepth, uint layer=0)
 
virtual void resize (uint width, uint height)
 
virtual void interface ()
 
virtual ~Renderer ()=default
 
 Renderer (const Renderer &)=delete
 
Rendereroperator= (const Renderer &)=delete
 
 Renderer (Renderer &&)=delete
 
Rendereroperator= (Renderer &&)=delete
 
Layout outputColorFormat () const
 
Layout outputDepthFormat () const
 

Private Types

enum class  ProbeMode : int { SHCOEFFS = 0 , RADIANCE = 1 }
 

Private Member Functions

void updateSceneMesh ()
 

Private Attributes

DebugLightRenderer _lightDebugRenderer
 The lights debug renderer.
 
std::shared_ptr< Scene_scene
 The scene to render.
 
const Mesh_sphere = nullptr
 Sphere mesh.
 
Program_probeProgram = nullptr
 Light probe visu.
 
Program_boxesProgram = nullptr
 Bounding boxes visu.
 
Program_frameProgram = nullptr
 Frame and gizmo visu.
 
Mesh _sceneBoxes
 Bounding boxes of all scene objects.
 
Mesh _frame
 Gizmo and grid in world space.
 
Mesh _cubeLines
 General wireframe cube.
 
ProbeMode _probeMode = ProbeMode::RADIANCE
 Probe info to display.
 
float _probeRoughness = 0.0f
 Radiance level to display.
 
bool _showLights = true
 Show lights wireframe.
 
bool _showProbe = true
 Show probe data.
 
bool _showBoxes = true
 Show scene objects bounding boxes.
 
bool _showFrame = true
 Show world frame (grid and gizmo).
 

Additional Inherited Members

- Protected Attributes inherited from Renderer
std::string _name
 Debug name.
 
Layout _colorFormat = Layout::NONE
 The preferred output format for a given renderer.
 
Layout _depthFormat = Layout::NONE
 The preferred output format for a given renderer.
 

Detailed Description

Provide debuggging visualization for most scene elements.

Inherits Renderer.

Member Enumeration Documentation

◆ ProbeMode

enum class DebugRenderer::ProbeMode : int
strongprivate

Probe info to visualize.

Enumerator
SHCOEFFS 

Irradiance SH coeffs.

RADIANCE 

(preconvolved) radiance cubemap.

Constructor & Destructor Documentation

◆ DebugRenderer()

DebugRenderer::DebugRenderer ( )
explicit

Constructor.

Member Function Documentation

◆ draw()

void DebugRenderer::draw ( const Camera camera,
Texture dstColor,
Texture dstDepth,
uint  layer = 0 
)
overridevirtual

Draw from a given viewpoint.

Parameters
camerathe rendering viewpoint
dstColorthe destination color texture (optional, see outputColorFormat)
dstDepththe destination depth texture (optional, see outputDepthFormat)
layerthe layer to write to in the target

Reimplemented from Renderer.

◆ interface()

void DebugRenderer::interface ( )
overridevirtual

Display GUI exposing renderer options.

Note
The renderer can assume that a GUI window is currently open.

Reimplemented from Renderer.

◆ setScene()

void DebugRenderer::setScene ( const std::shared_ptr< Scene > &  scene)

Set the scene to render.

Parameters
scenethe new scene

◆ updateSceneMesh()

void DebugRenderer::updateSceneMesh ( )
private

Update the bounding boxes mesh.


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