Rendu
A lightweight rendering engine for experimentations
|
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 | |
Renderer & | operator= (const Renderer &)=delete |
Renderer (Renderer &&)=delete | |
Renderer & | operator= (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. | |
Render the scene in the editor.
Inherits Renderer.
|
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.
|
private |
Render background object.
view | the view matrix |
proj | the projection matrix |
pos | the viewer position |
void EditorRenderer::setScene | ( | const std::shared_ptr< Scene > & | scene | ) |
Set the scene to render.
scene | the new scene |