SuperTuxKart
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ShaderBasedRenderer Class Reference
Inheritance diagram for ShaderBasedRenderer:
Inheritance graph
[legend]

Public Member Functions

void onLoadWorld () OVERRIDE
 
void onUnloadWorld () OVERRIDE
 
void resetPostProcessing () OVERRIDE
 
void giveBoost (unsigned int cam_index) OVERRIDE
 
void addSkyBox (const std::vector< irr::video::IImage * > &texture, const std::vector< irr::video::IImage * > &spherical_harmonics_textures)
 
void removeSkyBox () OVERRIDE
 
const SHCoefficientsgetSHCoefficients () const OVERRIDE
 
GLuint getRenderTargetTexture (TypeRTT which) const OVERRIDE
 
GLuint getDepthStencilTexture () const OVERRIDE
 
void setAmbientLight (const irr::video::SColorf &light, bool force_SH_computation=true) OVERRIDE
 
void addSunLight (const irr::core::vector3df &pos) OVERRIDE
 
void render (float dt, bool is_loading=false) OVERRIDE
 
std::unique_ptr< RenderTargetcreateRenderTarget (const irr::core::dimension2du &dimension, const std::string &name) OVERRIDE
 Create a RenderTarget (for rendering to a texture)
 
void renderToTexture (GL3RenderTarget *render_target, irr::scene::ICameraSceneNode *camera, float dt)
 
void setRTT (RTT *rtts)
 
RTTgetRTTs ()
 
ShadowMatricesgetShadowMatrices ()
 
PostProcessinggetPostProcessing ()
 
void dumpRTT ()
 
void createPostProcessing () OVERRIDE
 
- Public Member Functions inherited from AbstractRenderer
virtual void onLoadWorld ()=0
 
virtual void onUnloadWorld ()=0
 
virtual void resetPostProcessing ()
 
virtual void giveBoost (unsigned int cam_index)
 
virtual void removeSkyBox ()
 
virtual const SHCoefficientsgetSHCoefficients () const
 
virtual GLuint getRenderTargetTexture (TypeRTT which) const
 
virtual GLuint getDepthStencilTexture () const
 
virtual void setAmbientLight (const irr::video::SColorf &light, bool force_SH_computation=true)
 
virtual void addSunLight (const irr::core::vector3df &pos)
 
virtual void addGlowingNode (irr::scene::ISceneNode *n, float r=1.0f, float g=1.0f, float b=1.0f)
 
virtual void clearGlowingNodes ()
 
virtual void render (float dt, bool is_loading=false)=0
 
const irr::core::vector2df & getCurrentScreenSize () const
 
virtual std::unique_ptr< RenderTargetcreateRenderTarget (const irr::core::dimension2du &dimension, const std::string &name)=0
 Create a RenderTarget (for rendering to a texture)
 
virtual void createPostProcessing ()
 

Private Member Functions

void prepareForwardRenderer ()
 
void uploadLightingData () const
 Upload lighting info to the dedicated uniform buffer.
 
void computeMatrixesAndCameras (scene::ICameraSceneNode *const camnode, unsigned int width, unsigned int height)
 
void resetShadowCamNodes ()
 
void renderSkybox (const scene::ICameraSceneNode *camera) const
 
void prepareDrawCalls (scene::ICameraSceneNode *camnode)
 
void renderSSAO () const
 
void renderGlow () const
 
void renderScene (irr::scene::ICameraSceneNode *const camnode, float dt, bool hasShadows, bool forceRTT)
 
void renderSceneDeferred (irr::scene::ICameraSceneNode *const camnode, float dt, bool hasShadows, bool forceRTT)
 
void debugPhysics ()
 
void renderPostProcessing (Camera *const camera, bool first_cam)
 
void preloadShaderFiles ()
 
void renderShadows ()
 

Private Attributes

bool m_dump_rtt
 
RTTm_rtts
 
Skyboxm_skybox
 
SphericalHarmonicsm_spherical_harmonics
 
DrawCalls m_draw_calls
 
LightingPasses m_lighting_passes
 
ShadowMatrices m_shadow_matrices
 
std::unique_ptr< PostProcessingm_post_processing
 

Additional Inherited Members

- Protected Member Functions inherited from AbstractRenderer
void renderSkybox (const irr::scene::ICameraSceneNode *camera) const
 
- Protected Attributes inherited from AbstractRenderer
irr::core::vector2df m_current_screen_size
 

Member Function Documentation

◆ addSunLight()

void ShaderBasedRenderer::addSunLight ( const irr::core::vector3df &  pos)
virtual

Reimplemented from AbstractRenderer.

◆ createPostProcessing()

void ShaderBasedRenderer::createPostProcessing ( )
virtual

Reimplemented from AbstractRenderer.

◆ createRenderTarget()

std::unique_ptr< RenderTarget > ShaderBasedRenderer::createRenderTarget ( const irr::core::dimension2du &  dimension,
const std::string &  name 
)
virtual

Create a RenderTarget (for rendering to a texture)

Parameters
dimensionThe dimension of the texture
nameA unique name for the render target

Implements AbstractRenderer.

◆ getDepthStencilTexture()

GLuint ShaderBasedRenderer::getDepthStencilTexture ( ) const
virtual

Reimplemented from AbstractRenderer.

◆ getRenderTargetTexture()

GLuint ShaderBasedRenderer::getRenderTargetTexture ( TypeRTT  which) const
virtual

Reimplemented from AbstractRenderer.

◆ getSHCoefficients()

const SHCoefficients * ShaderBasedRenderer::getSHCoefficients ( ) const
virtual

Reimplemented from AbstractRenderer.

◆ giveBoost()

void ShaderBasedRenderer::giveBoost ( unsigned int  cam_index)
virtual

Reimplemented from AbstractRenderer.

◆ onLoadWorld()

void ShaderBasedRenderer::onLoadWorld ( )
virtual

Implements AbstractRenderer.

◆ onUnloadWorld()

void ShaderBasedRenderer::onUnloadWorld ( )
virtual

Implements AbstractRenderer.

◆ removeSkyBox()

void ShaderBasedRenderer::removeSkyBox ( )
virtual

Reimplemented from AbstractRenderer.

◆ render()

void ShaderBasedRenderer::render ( float  dt,
bool  is_loading = false 
)
virtual

Implements AbstractRenderer.

◆ resetPostProcessing()

void ShaderBasedRenderer::resetPostProcessing ( )
virtual

Reimplemented from AbstractRenderer.

◆ setAmbientLight()

void ShaderBasedRenderer::setAmbientLight ( const irr::video::SColorf &  light,
bool  force_SH_computation = true 
)
virtual

Reimplemented from AbstractRenderer.


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