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

Render the scene in the editor. More...

#include <EditorRenderer.hpp>

Public Member Functions

 EditorRenderer ()
 
void setScene (const std::shared_ptr< Scene > &scene)
 
void draw (const Camera &camera, Texture *dstColor, Texture *dstDepth, uint layer=0) 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 Member Functions

void renderBackground (const glm::mat4 &view, const glm::mat4 &proj, const glm::vec3 &pos)
 

Private Attributes

DebugLightRenderer _lightsDebug
 Lights wireframe renderer.
 
Program_objectProgram
 Basic object program.
 
Program_skyboxProgram
 Skybox program.
 
Program_bgProgram
 2D background program.
 
Program_atmoProgram
 Atmosphere shader.
 
std::shared_ptr< Scene_scene
 The scene to render.
 

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

Render the scene in the editor.

Inherits Renderer.

Constructor & Destructor Documentation

◆ EditorRenderer()

EditorRenderer::EditorRenderer ( )
explicit

Constructor.

Member Function Documentation

◆ draw()

void EditorRenderer::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.

◆ renderBackground()

void EditorRenderer::renderBackground ( const glm::mat4 &  view,
const glm::mat4 &  proj,
const glm::vec3 &  pos 
)
private

Render background object.

Parameters
viewthe view matrix
projthe projection matrix
posthe viewer position

◆ setScene()

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

Set the scene to render.

Parameters
scenethe new scene

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