#include <Dataflow/Rendering/Renderer/DataflowRenderer.hpp>
Classes | |
struct | RenderGraphController |
Public Member Functions | |
DataflowRenderer (RenderGraphController &controller) | |
Construct a renderer configured and managed through the controller. | |
~DataflowRenderer () override | |
The destructor is used to destroy the render graph. | |
std::string | getRendererName () const override |
Get the name of the renderer, e.g to be displayed in the UI. | |
bool | buildRenderTechnique (Ra::Engine::Rendering::RenderObject *ro) const override |
Ra::Engine::Scene::LightManager * | getLightManager () |
Access the default light manager. | |
RenderGraphController & | getController () |
Access the controller. | |
std::map< std::string, std::shared_ptr< Ra::Engine::Data::Texture > > & | sharedTextures () |
globjects::Framebuffer * | postprocessFbo () |
std::vector< RenderObjectPtr > * | allRenderObjects () |
std::vector< const Ra::Engine::Scene::Light * > * | getLights () |
![]() | |
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 : | |
void | initialize (uint width, uint height) |
Initialize renderer. | |
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) | |
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. | |
virtual std::vector< std::string > | getAvailableTextures () const |
Return the names of renderer available textures. | |
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 Member Functions | |
void | initializeInternal () override |
Sets the display sink node. | |
void | resizeInternal () override |
void | updateStepInternal (const Ra::Engine::Data::ViewingParameters &renderData) override |
void | renderInternal (const Ra::Engine::Data::ViewingParameters &renderData) override |
All the scene rendering magics basically happens here. | |
void | postProcessInternal (const Ra::Engine::Data::ViewingParameters &renderData) override |
Do all post processing stuff. If you override this method, be careful to fill. | |
void | debugInternal (const Ra::Engine::Data::ViewingParameters &renderData) override |
Add the debug layer with useful informations. | |
void | uiInternal (const Ra::Engine::Data::ViewingParameters &renderData) override |
Draw the UI data. | |
virtual void | initResources () |
![]() |
Dataflow renderer for the Radium Engine This Renderer is fully configurable, either dynamically or programmatically. It implements the Ra::Engine::Rendering/Renderer interface.
A NodeBasedRenderer is configured by using the RenderControlFunctor given at construction. A RenderControlFunctor offers the following services :
A NodeBasedRenderer defines two textures that might be shared between passes :
If requested on the base Ra::Engine::Rendering::Renderer, a NodeBasedRenderer apply a post-process step on the "Linear RGB (RadiumNBR)" that convert colors from linearRGB to sRGB color space before displaying the image.
Definition at line 56 of file DataflowRenderer.hpp.
|
explicit |
Construct a renderer configured and managed through the controller.
Definition at line 90 of file DataflowRenderer.cpp.
|
inline |
Definition at line 167 of file DataflowRenderer.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 101 of file DataflowRenderer.cpp.
|
overrideprotectedvirtual |
Add the debug layer with useful informations.
Implements Ra::Engine::Rendering::Renderer.
Definition at line 231 of file DataflowRenderer.cpp.
|
inline |
Access the controller.
Definition at line 117 of file DataflowRenderer.hpp.
|
inline |
Access the default light manager.
Definition at line 114 of file DataflowRenderer.hpp.
|
inline |
Definition at line 169 of file DataflowRenderer.hpp.
|
inlinenodiscardoverridevirtual |
Get the name of the renderer, e.g to be displayed in the UI.
Implements Ra::Engine::Rendering::Renderer.
Definition at line 109 of file DataflowRenderer.hpp.
|
overrideprotectedvirtual |
Sets the display sink node.
Loads the render graph from a Json file. Gets the Json file path Sets the Json file path Reloads the render graph Reloads the render graph according to the current Json file Raises the flag to reload the Json
Implements Ra::Engine::Rendering::Renderer.
Definition at line 125 of file DataflowRenderer.cpp.
|
protectedvirtual |
Initialize internal resources for the renderer. The base function creates the depth and final color texture to be shared by the rendering passes that need them.
Definition at line 113 of file DataflowRenderer.cpp.
|
inline |
Definition at line 165 of file DataflowRenderer.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 208 of file DataflowRenderer.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 189 of file DataflowRenderer.cpp.
|
overrideprotectedvirtual |
resize the renderer dependent resources
Implements Ra::Engine::Rendering::Renderer.
Definition at line 150 of file DataflowRenderer.cpp.
|
inline |
Definition at line 161 of file DataflowRenderer.hpp.
|
overrideprotectedvirtual |
Draw the UI data.
Implements Ra::Engine::Rendering::Renderer.
Definition at line 233 of file DataflowRenderer.cpp.
|
overrideprotectedvirtual |
Update the renderer dependent resources for the next frame
renderData |
Implements Ra::Engine::Rendering::Renderer.
Definition at line 167 of file DataflowRenderer.cpp.