Radium Engine
1.5.0
|
#include <Engine/Rendering/ForwardRenderer.hpp>
Public Member Functions | |
std::string | getRendererName () const override |
Get the name of the renderer, e.g to be displayed in the UI. More... | |
bool | buildRenderTechnique (RenderObject *ro) const override |
Public Member Functions inherited from Ra::Engine::Rendering::Renderer | |
Renderer () | |
const TimerData & | getTimerData () const |
Data::Texture * | getDisplayTexture () const |
void | lockRendering () |
void | unlockRendering () |
void | toggleWireframe () |
void | enableWireframe (bool enabled) |
void | toggleDrawDebug () |
void | enableDebugDraw (bool enabled) |
void | enablePostProcess (bool enabled) |
void | render (const Data::ViewingParameters &renderData) |
Tell the renderer it needs to render. This method does the following steps : More... | |
void | initialize (uint width, uint height) |
Initialize renderer. More... | |
void | resize (uint width, uint height) |
Resize the viewport and all the screen textures, fbos. This function must be overrided as soon as some FBO or screensized texture is used (since the default implementation just resizes its own fbos / textures) More... | |
void | addPickingRequest (const PickingQuery &query) |
const std::vector< PickingResult > & | getPickingResults () const |
const std::vector< PickingQuery > & | getPickingQueries () const |
void | setMousePosition (const Core::Vector2 &pos) |
void | setBrushRadius (Scalar brushRadius) |
bool | hasLight () const |
Tell if the renderer has an usable light. | |
void | setBackgroundColor (const Core::Utils::Color &color) |
Update the background color (does not trigger a redraw) | |
const Core::Utils::Color & | getBackgroundColor () const |
virtual void | addLight (const Scene::Light *light) |
virtual void | reloadShaders () |
virtual void | displayTexture (const std::string &texName) |
Change the texture that is displayed on screen. Set m_displayedIsDepth to true if depth linearization is wanted. More... | |
virtual std::vector< std::string > | getAvailableTextures () const |
Return the names of renderer available textures. More... | |
int | buildAllRenderTechniques () const |
virtual std::unique_ptr< uchar[]> | grabFrame (size_t &w, size_t &h) const |
PickingResult | doPickingNow (const PickingQuery &query, const Data::ViewingParameters &renderData) |
Protected Types | |
enum | RendererTextures { RendererTextures_Depth = 0 , RendererTextures_HDR , RendererTextures_Normal , RendererTextures_Diffuse , RendererTextures_Specular , RendererTextures_OITAccum , RendererTextures_OITRevealage , RendererTextures_Volume , RendererTexture_Count } |
using | WireMap = std::map< RenderObject *, std::shared_ptr< Data::Displayable > > |
Protected Types inherited from Ra::Engine::Rendering::Renderer | |
using | RenderObjectPtr = std::shared_ptr< RenderObject > |
Protected Member Functions | |
void | initializeInternal () override |
initializeInternal Initialize the renderer dependant resources. | |
void | resizeInternal () override |
void | updateStepInternal (const Data::ViewingParameters &renderData) override |
void | postProcessInternal (const Data::ViewingParameters &renderData) override |
Do all post processing stuff. If you override this method, be careful to fill. More... | |
void | renderInternal (const Data::ViewingParameters &renderData) override |
All the scene rendering magics basically happens here. More... | |
void | debugInternal (const Data::ViewingParameters &renderData) override |
Add the debug layer with useful informations. | |
void | uiInternal (const Data::ViewingParameters &renderData) override |
Draw the UI data. | |
virtual void | renderBackground (const Data::ViewingParameters &) |
Draw the picture background. This method allows custom renderers to draw objects on the background. Called before the Zpre-pass, but after clearing the draw buffers. | |
Protected Attributes | |
std::unique_ptr< globjects::Framebuffer > | m_fbo |
std::unique_ptr< globjects::Framebuffer > | m_postprocessFbo |
std::unique_ptr< globjects::Framebuffer > | m_oitFbo |
std::unique_ptr< globjects::Framebuffer > | m_uiXrayFbo |
std::unique_ptr< globjects::Framebuffer > | m_volumeFbo |
std::vector< RenderObjectPtr > | m_transparentRenderObjects |
size_t | m_fancyTransparentCount { 0 } |
std::vector< RenderObjectPtr > | m_volumetricRenderObjects |
size_t | m_fancyVolumetricCount { 0 } |
size_t | m_pingPongSize { 0 } |
std::array< std::unique_ptr< Data::Texture >, RendererTexture_Count > | m_textures |
std::vector< std::shared_ptr< Data::Texture > > | m_shadowMaps |
std::vector< Core::Matrix4 > | m_lightMatrices |
WireMap | m_wireframes |
Protected Attributes inherited from Ra::Engine::Rendering::Renderer | |
uint | m_width { 0 } |
uint | m_height { 0 } |
Data::ShaderProgramManager * | m_shaderProgramManager { nullptr } |
RenderObjectManager * | m_renderObjectManager { nullptr } |
Data::Texture * | m_displayedTexture { nullptr } |
The texture that will be displayed on screen. If no call to. More... | |
std::vector< Ra::Engine::Scene::LightManager * > | m_lightmanagers |
bool | m_renderQueuesUpToDate { false } |
std::vector< RenderObjectPtr > | m_fancyRenderObjects |
std::vector< RenderObjectPtr > | m_debugRenderObjects |
std::vector< RenderObjectPtr > | m_xrayRenderObjects |
std::vector< RenderObjectPtr > | m_uiRenderObjects |
std::unique_ptr< Data::Displayable > | m_quadMesh |
bool | m_drawDebug { true } |
bool | m_wireframe { false } |
bool | m_postProcessEnabled { true } |
std::unique_ptr< Data::Texture > | m_depthTexture |
Depth texture : might be attached to the main framebuffer. | |
std::unique_ptr< Data::Texture > | m_fancyTexture |
Final color texture : might be attached to the main framebuffer. | |
std::map< std::string, Data::Texture * > | m_secondaryTextures |
Textures exposed in the texture section box to be displayed. | |
Static Protected Attributes | |
static const size_t | ShadowMapSize { 1024 } |
Additional Inherited Members | |
Public Types inherited from Ra::Engine::Rendering::Renderer | |
enum | PickingMode { RO = 0 , VERTEX , EDGE , TRIANGLE , C_VERTEX , C_EDGE , C_TRIANGLE , NONE } |
enum | PickingPurpose { SELECTION = 0 , MANIPULATION } |
Default renderer for the Radium Engine This classe implements aforward rendering algorithm with Z-prepass, multipass light accumulation for opaque and transperent objects. Once renderer, the final is composited with Ui, debug and X-ray objects renderings on demand.
Definition at line 23 of file ForwardRenderer.hpp.
|
overridevirtual |
Define, for the given render object, the render technique cooresponding to the renderer.
ro | the render object to modofy |
Implements Ra::Engine::Rendering::Renderer.
Definition at line 706 of file ForwardRenderer.cpp.
|
inlineoverridevirtual |
Get the name of the renderer, e.g to be displayed in the UI.
Implements Ra::Engine::Rendering::Renderer.
Definition at line 29 of file ForwardRenderer.hpp.
|
overrideprotectedvirtual |
Do all post processing stuff. If you override this method, be careful to fill.
renderData | The basic data needed for the rendering : Time elapsed since last frame, camera view matrix, camera projection matrix. |
Implements Ra::Engine::Rendering::Renderer.
Definition at line 589 of file ForwardRenderer.cpp.
|
overrideprotectedvirtual |
All the scene rendering magics basically happens here.
renderData | The basic data needed for the rendering : Time elapsed since last frame, camera view matrix, camera projection matrix. |
Implements Ra::Engine::Rendering::Renderer.
Definition at line 259 of file ForwardRenderer.cpp.
|
overrideprotectedvirtual |
resize the renderer dependent resources
Implements Ra::Engine::Rendering::Renderer.
Definition at line 610 of file ForwardRenderer.cpp.
|
overrideprotectedvirtual |
Update the renderer dependent resources for the next frame
renderData |
Implements Ra::Engine::Rendering::Renderer.
Definition at line 152 of file ForwardRenderer.cpp.