Jopnal Engine  alpha 0.4
Simple Component Based 2D/3D Game Engine
Public Member Functions | Protected Member Functions | List of all members
jop::SortedRenderPass Struct Reference

Distance-sorted render pass. More...

#include <RenderPass.hpp>

Inheritance diagram for jop::SortedRenderPass:
jop::RenderPass

Public Member Functions

 SortedRenderPass (Renderer &renderer, const RenderTarget &target, const Pass pass, const uint32 weight)
 Constructor. More...
 
- Public Member Functions inherited from jop::RenderPass
 RenderPass (Renderer &renderer, const RenderTarget &target, const Pass pass, const uint32 weight)
 Constructor. More...
 
virtual ~RenderPass ()=0
 Virtual destructor. More...
 
void setActive (const bool active)
 Set this render pass active/inactive. More...
 
bool isActive () const
 Check if this render pass is active. More...
 
RenderergetRenderer ()
 Get the renderer this pass is bound to. More...
 
Pass getPass () const
 Get the render pass type. More...
 

Protected Member Functions

void draw () override
 Virtual draw function. More...
 
void bind (const Drawable *drawable) override
 Bind a drawable. More...
 
void unbind (const Drawable *drawable) override
 Unbind a drawable. More...
 

Additional Inherited Members

- Public Types inherited from jop::RenderPass
enum  Pass { Pass::BeforePost, Pass::AfterPost }
 
- Static Public Attributes inherited from jop::RenderPass
static const uint32 DefaultWeight
 The default render pass weight. More...
 
- Protected Attributes inherited from jop::RenderPass
Rendererm_rendererRef
 Reference to the renderer. More...
 
const RenderTargetm_target
 Reference to the render target. More...
 
const uint32 m_weight
 Weight value. More...
 
const Pass m_pass
 Render pass type. More...
 
bool m_active
 Is this render pass active? More...
 

Detailed Description

Distance-sorted render pass.

Sorts opaque drawables from nearest to farthest and translucent drawables the other way around.

Draws its drawables in three different sets:

  1. Opaque objects
  2. Sky boxes/spheres
  3. Translucent objects

By default Renderer creates one of these as a BeforePost pass, using RenderPass::DefaultWeight.

Definition at line 144 of file RenderPass.hpp.

Constructor & Destructor Documentation

jop::SortedRenderPass::SortedRenderPass ( Renderer renderer,
const RenderTarget target,
const Pass  pass,
const uint32  weight 
)

Constructor.

Parameters
rendererReference to the renderer
targetReference to the render target
passThe render pass type
weightThe weight of this render pass

Member Function Documentation

void jop::SortedRenderPass::bind ( const Drawable drawable)
overrideprotectedvirtual

Bind a drawable.

Parameters
drawableThe drawable to bind

Implements jop::RenderPass.

void jop::SortedRenderPass::draw ( )
overrideprotectedvirtual

Virtual draw function.

Implements jop::RenderPass.

void jop::SortedRenderPass::unbind ( const Drawable drawable)
overrideprotectedvirtual

Unbind a drawable.

Parameters
drawableThe drawable to unbind

Implements jop::RenderPass.


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