Jopnal Engine  alpha 0.4
Simple Component Based 2D/3D Game Engine
Public Member Functions | Friends | List of all members
jop::Renderer Class Referencefinal

#include <Renderer.hpp>

Public Member Functions

 Renderer (const RenderTarget &mainTarget, Scene &sceneRef)
 Constructor. More...
 
const RenderTargetgetRenderTarget () const
 Get the bound render target. More...
 
const CameraSet & getCameras () const
 Get the camera set. More...
 
const LightSet & getLights () const
 Get the light set. More...
 
template<typename T , typename... Args>
T & createRenderPass (const RenderPass::Pass pass, const uint32 weight, Args &&...args)
 Create a new render pass. More...
 
template<typename T >
T * getRenderPass (const RenderPass::Pass pass, const uint32 weight)
 Get a render pass. More...
 
void removeRenderPass (const RenderPass::Pass pass, const uint32 weight)
 Remove and delete a render pass. More...
 
void draw (const RenderPass::Pass pass)
 Draw. More...
 
WorldgetCullingWorld ()
 Get the culling world. More...
 

Friends

class Camera
 
class LightSource
 
class EnvironmentRecorder
 
class Drawable
 

Detailed Description

Definition at line 45 of file Renderer.hpp.

Constructor & Destructor Documentation

jop::Renderer::Renderer ( const RenderTarget mainTarget,
Scene sceneRef 
)

Constructor.

Parameters
mainTargetReference to the main render target

Member Function Documentation

template<typename T , typename... Args>
T& jop::Renderer::createRenderPass ( const RenderPass::Pass  pass,
const uint32  weight,
Args &&...  args 
)

Create a new render pass.

If a pass with the same type and weight already exists, it will be replaced.

Parameters
passThe render pas type
weightThe weight. Lesser weight means higher priority during rendering
argsThe arguments to pass to the render pass' constructor
Returns
Reference to the newly created render pass
void jop::Renderer::draw ( const RenderPass::Pass  pass)

Draw.

Parameters
passThe render passes to draw
const CameraSet& jop::Renderer::getCameras ( ) const

Get the camera set.

Returns
Reference to the camera set
World& jop::Renderer::getCullingWorld ( )

Get the culling world.

const LightSet& jop::Renderer::getLights ( ) const

Get the light set.

Returns
Reference to the light set
template<typename T >
T* jop::Renderer::getRenderPass ( const RenderPass::Pass  pass,
const uint32  weight 
)

Get a render pass.

Parameters
passThe render pass type
weightThe weight
Returns
Pointer to the render pass. nullptr if no pass exists with the given type and weight
const RenderTarget& jop::Renderer::getRenderTarget ( ) const

Get the bound render target.

Returns
Reference to the render target
void jop::Renderer::removeRenderPass ( const RenderPass::Pass  pass,
const uint32  weight 
)

Remove and delete a render pass.

You must only call this after all the bound drawables have been removed.

Parameters
passRender pass type
weightThe weight of the pass to remove

Friends And Related Function Documentation

friend class Camera
friend

Definition at line 55 of file Renderer.hpp.

friend class Drawable
friend

Definition at line 58 of file Renderer.hpp.

friend class EnvironmentRecorder
friend

Definition at line 57 of file Renderer.hpp.

friend class LightSource
friend

Definition at line 56 of file Renderer.hpp.


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