![]() |
Jopnal Engine
alpha 0.4
Simple Component Based 2D/3D Game Engine
|
Distance-sorted render pass. More...
#include <RenderPass.hpp>
Public Member Functions | |
SortedRenderPass (Renderer &renderer, const RenderTarget &target, const Pass pass, const uint32 weight) | |
Constructor. More... | |
![]() | |
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... | |
Renderer & | getRenderer () |
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 | |
![]() | |
enum | Pass { Pass::BeforePost, Pass::AfterPost } |
![]() | |
static const uint32 | DefaultWeight |
The default render pass weight. More... | |
![]() | |
Renderer & | m_rendererRef |
Reference to the renderer. More... | |
const RenderTarget & | m_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... | |
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:
By default Renderer creates one of these as a BeforePost pass, using RenderPass::DefaultWeight.
Definition at line 144 of file RenderPass.hpp.
jop::SortedRenderPass::SortedRenderPass | ( | Renderer & | renderer, |
const RenderTarget & | target, | ||
const Pass | pass, | ||
const uint32 | weight | ||
) |
Constructor.
renderer | Reference to the renderer |
target | Reference to the render target |
pass | The render pass type |
weight | The weight of this render pass |
|
overrideprotectedvirtual |
|
overrideprotectedvirtual |
Virtual draw function.
Implements jop::RenderPass.
|
overrideprotectedvirtual |