Rendu
A lightweight rendering engine for experimentations
|
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 | |
Renderer & | operator= (const Renderer &)=delete |
Renderer (Renderer &&)=delete | |
Renderer & | operator= (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. | |
Provide debuggging visualization for most scene elements.
Inherits Renderer.
|
strongprivate |
Probe info to visualize.
Enumerator | |
---|---|
SHCOEFFS | Irradiance SH coeffs. |
RADIANCE | (preconvolved) radiance cubemap. |
|
explicit |
Constructor.
|
overridevirtual |
Draw from a given viewpoint.
camera | the rendering viewpoint |
dstColor | the destination color texture (optional, see outputColorFormat) |
dstDepth | the destination depth texture (optional, see outputDepthFormat) |
layer | the layer to write to in the target |
Reimplemented from Renderer.
|
overridevirtual |
Display GUI exposing renderer options.
Reimplemented from Renderer.
void DebugRenderer::setScene | ( | const std::shared_ptr< Scene > & | scene | ) |
Set the scene to render.
scene | the new scene |
|
private |
Update the bounding boxes mesh.