#include <Engine/Rendering/Renderer.hpp>
Abstract renderer for the engine.
- See also
- Radium Engine default rendering informations
Definition at line 44 of file Renderer.hpp.
◆ RenderObjectPtr
◆ PickingMode
Picking mode
Enumerator |
---|
RO | Pick a mesh.
|
VERTEX | Pick a vertex of a mesh.
|
EDGE | Pick an edge of a mesh.
|
TRIANGLE | Pick a triangle of a mesh.
|
C_VERTEX | Picks all vertices of a mesh within a screen space circle.
|
C_EDGE | Picks all edges of a mesh within a screen space circle.
|
C_TRIANGLE | Picks all triangles of a mesh within a screen space circle.
|
NONE | Do not pick ;)
|
Definition at line 65 of file Renderer.hpp.
◆ PickingPurpose
Picking purpose Used to identify what picking operation is realized
Definition at line 80 of file Renderer.hpp.
◆ Renderer()
Ra::Engine::Rendering::Renderer::Renderer |
( |
| ) |
|
Abstract rendere constructor
could be called without openGL context. Call initialize once the openGL rendering context is available before using the renderer
Definition at line 47 of file Renderer.cpp.
◆ addLight()
void Ra::Engine::Rendering::Renderer::addLight |
( |
const Scene::Light * | light | ) |
|
|
virtual |
Add a light to the renderer. may be overridden to filter the light or to specialize the way ligths are added to the renderer ...
- Parameters
-
Definition at line 751 of file Renderer.cpp.
◆ addPickingRequest()
void Ra::Engine::Rendering::Renderer::addPickingRequest |
( |
const PickingQuery & | query | ) |
|
|
inline |
Add a new picking query for the next rendering
- Parameters
-
Definition at line 591 of file Renderer.hpp.
◆ buildAllRenderTechniques()
int Ra::Engine::Rendering::Renderer::buildAllRenderTechniques |
( |
| ) |
const |
Loops over all available renderobjects and, build the associated render technique using buildRenderTechnique(RenderObject *ro)
- Returns
- the number of render objects initialized
Definition at line 763 of file Renderer.cpp.
◆ buildRenderTechnique()
virtual bool Ra::Engine::Rendering::Renderer::buildRenderTechnique |
( |
RenderObject * | ro | ) |
const |
|
pure virtual |
Define, for the given render object, the render technique cooresponding to the renderer.
- Parameters
-
ro | the render object to modofy |
- Returns
- True if the renderTechnique was defined.
Implemented in Ra::Engine::Rendering::ForwardRenderer.
◆ debugInternal()
◆ displayTexture()
void Ra::Engine::Rendering::Renderer::displayTexture |
( |
const std::string & | texName | ) |
|
|
virtual |
Change the texture that is displayed on screen. Set m_displayedIsDepth to true if depth linearization is wanted.
- Parameters
-
texName | The texture to display. |
Definition at line 696 of file Renderer.cpp.
◆ doPickingNow()
◆ enableDebugDraw()
void Ra::Engine::Rendering::Renderer::enableDebugDraw |
( |
bool | enabled | ) |
|
|
inline |
Set the debug rendering mode
- Parameters
-
enabled | true if rendering mode must include debug objects, false else |
Definition at line 583 of file Renderer.hpp.
◆ enablePostProcess()
void Ra::Engine::Rendering::Renderer::enablePostProcess |
( |
bool | enabled | ) |
|
|
inline |
set the post-process mode
- Parameters
-
enabled | true if post processing must bve applied before display. |
Definition at line 587 of file Renderer.hpp.
◆ enableWireframe()
void Ra::Engine::Rendering::Renderer::enableWireframe |
( |
bool | enabled | ) |
|
|
inline |
set the fill/wireframe rendering mode
- Parameters
-
enabled | true if rendering mode must be wireframe, false for fill render mode |
Definition at line 575 of file Renderer.hpp.
◆ getAvailableTextures()
Return the names of renderer available textures.
- Returns
- A vector of strings, containing the name of the different textures
Definition at line 703 of file Renderer.cpp.
◆ getBackgroundColor()
◆ getDisplayTexture()
Data::Texture * Ra::Engine::Rendering::Renderer::getDisplayTexture |
( |
| ) |
const |
|
inline |
Get the currently displayed texture
Definition at line 559 of file Renderer.hpp.
◆ getPickingQueries()
Get the vector of picking queries. Queries in the returned vector correspond to results in the return vector by the function getPickingResults().
- Returns
- Queries results
Definition at line 599 of file Renderer.hpp.
◆ getPickingResults()
Get the vector of picking results. Results in the returned vector correspond to queries in the return vector by the function getPickingQueries().
- Returns
- Queries results
Definition at line 595 of file Renderer.hpp.
◆ getRendererName()
virtual std::string Ra::Engine::Rendering::Renderer::getRendererName |
( |
| ) |
const |
|
pure virtual |
◆ getTimerData()
Extract the timings from las render
Definition at line 555 of file Renderer.hpp.
◆ grabFrame()
std::unique_ptr< uchar[]> Ra::Engine::Rendering::Renderer::grabFrame |
( |
size_t & | w, |
|
|
size_t & | h ) const |
|
virtual |
get the content of the current frame
- Parameters
-
w | width of the region to grab |
h | heigth oif the region to grab |
- Returns
- the pixel array
Definition at line 717 of file Renderer.cpp.
◆ hasLight()
bool Ra::Engine::Rendering::Renderer::hasLight |
( |
| ) |
const |
Tell if the renderer has an usable light.
Definition at line 756 of file Renderer.cpp.
◆ initialize()
void Ra::Engine::Rendering::Renderer::initialize |
( |
uint | width, |
|
|
uint | height ) |
Initialize renderer.
For internal resources management in a filesystem
Definition at line 56 of file Renderer.cpp.
◆ initializeInternal()
virtual void Ra::Engine::Rendering::Renderer::initializeInternal |
( |
| ) |
|
|
protectedpure virtual |
◆ lockRendering()
void Ra::Engine::Rendering::Renderer::lockRendering |
( |
| ) |
|
|
inline |
Lock rendering. Usefull if there is multithread update of the rendering data
Definition at line 563 of file Renderer.hpp.
◆ postProcessInternal()
Do all post processing stuff. If you override this method, be careful to fill.
- See also
- m_fancyTexture since it is the texture that will be displayed at the very end of the
-
render method.
- Parameters
-
renderData | The basic data needed for the rendering : Time elapsed since last frame, camera view matrix, camera projection matrix. |
Implemented in Ra::Engine::Rendering::ForwardRenderer.
◆ reloadShaders()
void Ra::Engine::Rendering::Renderer::reloadShaders |
( |
| ) |
|
|
virtual |
Reload, recompile and relink all shaders and programmed internally used by the renderer.
Definition at line 713 of file Renderer.cpp.
◆ render()
Tell the renderer it needs to render. This method does the following steps :
-
call
- See also
- updateRenderObjectsInternal method
-
call
- See also
- renderInternal method
-
call
- See also
- postProcessInternal method
-
render the final texture in the right framebuffer*
- Parameters
-
renderData | The basic data needed for the rendering : Time elapsed since last frame, camera view matrix, camera projection matrix. |
- Note
- * What "render in the right buffer" means, is that, for example, when using QOpenGLWidget, Qt binds its own framebuffer before calling updateGL() method. So, render() takes that into account by saving an eventual bound framebuffer, and restores it before drawing the last final texture. If no framebuffer was bound, it draws into GL_BACK.
Definition at line 315 of file Renderer.cpp.
◆ renderInternal()
All the scene rendering magics basically happens here.
- Parameters
-
renderData | The basic data needed for the rendering : Time elapsed since last frame, camera view matrix, camera projection matrix. |
Implemented in Ra::Engine::Rendering::ForwardRenderer.
◆ resize()
void Ra::Engine::Rendering::Renderer::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)
- Parameters
-
width | The new viewport width |
height | The new viewport height |
Definition at line 671 of file Renderer.cpp.
◆ resizeInternal()
virtual void Ra::Engine::Rendering::Renderer::resizeInternal |
( |
| ) |
|
|
protectedpure virtual |
◆ setBackgroundColor()
void Ra::Engine::Rendering::Renderer::setBackgroundColor |
( |
const Core::Utils::Color & | color | ) |
|
|
inline |
Update the background color (does not trigger a redraw)
Definition at line 612 of file Renderer.hpp.
◆ setBrushRadius()
void Ra::Engine::Rendering::Renderer::setBrushRadius |
( |
Scalar | brushRadius | ) |
|
|
inline |
◆ setMousePosition()
void Ra::Engine::Rendering::Renderer::setMousePosition |
( |
const Core::Vector2 & | pos | ) |
|
|
inline |
◆ toggleDrawDebug()
void Ra::Engine::Rendering::Renderer::toggleDrawDebug |
( |
| ) |
|
|
inline |
◆ toggleWireframe()
void Ra::Engine::Rendering::Renderer::toggleWireframe |
( |
| ) |
|
|
inline |
Toggle the fill/wireframe rendering mode
Definition at line 571 of file Renderer.hpp.
◆ uiInternal()
◆ unlockRendering()
void Ra::Engine::Rendering::Renderer::unlockRendering |
( |
| ) |
|
|
inline |
◆ updateStepInternal()
◆ m_debugRenderObjects
◆ m_depthTexture
Depth texture : might be attached to the main framebuffer.
Definition at line 473 of file Renderer.hpp.
◆ m_displayedTexture
Data::Texture* Ra::Engine::Rendering::Renderer::m_displayedTexture { nullptr } |
|
protected |
The texture that will be displayed on screen. If no call to.
- See also
- debugTexture has been done, this is just a pointer to
-
m_fancyTexture.
Definition at line 451 of file Renderer.hpp.
◆ m_drawDebug
bool Ra::Engine::Rendering::Renderer::m_drawDebug { true } |
|
protected |
◆ m_fancyRenderObjects
◆ m_fancyTexture
Final color texture : might be attached to the main framebuffer.
Definition at line 475 of file Renderer.hpp.
◆ m_height
uint Ra::Engine::Rendering::Renderer::m_height { 0 } |
|
protected |
◆ m_lightmanagers
A renderer could define several LightManager (for instance, one for point light, one other for infinite light ...)
Definition at line 455 of file Renderer.hpp.
◆ m_postProcessEnabled
bool Ra::Engine::Rendering::Renderer::m_postProcessEnabled { true } |
|
protected |
◆ m_quadMesh
◆ m_renderObjectManager
RenderObjectManager* Ra::Engine::Rendering::Renderer::m_renderObjectManager { nullptr } |
|
protected |
◆ m_renderQueuesUpToDate
bool Ra::Engine::Rendering::Renderer::m_renderQueuesUpToDate { false } |
|
protected |
◆ m_secondaryTextures
Textures exposed in the texture section box to be displayed.
Definition at line 477 of file Renderer.hpp.
◆ m_shaderProgramManager
◆ m_uiRenderObjects
◆ m_width
uint Ra::Engine::Rendering::Renderer::m_width { 0 } |
|
protected |
◆ m_wireframe
bool Ra::Engine::Rendering::Renderer::m_wireframe { false } |
|
protected |
◆ m_xrayRenderObjects
The documentation for this class was generated from the following files:
- /home/runner/work/Radium-Engine/Radium-Engine/src/Radium-Engine/src/Engine/Rendering/Renderer.hpp
- /home/runner/work/Radium-Engine/Radium-Engine/src/Radium-Engine/src/Engine/Rendering/Renderer.cpp