All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Luminous::PostProcessContext Class Reference

PostProcessContext is the render-thread specific context that is used for post processing to work in a multi-context environment. More...

#include <Luminous/PostProcessContext.hpp>

Inheritance diagram for Luminous::PostProcessContext:
Patterns::NotCopyable

Public Member Functions

const Luminous::RenderBufferdepthStencilBuffer () const
 Combined depth and stencil buffer used for rendering the scene.
 
void doFilter (Luminous::RenderContext &rc)
 Performs the filtering operation by setting the style values and calling PostProcessFilter::filter() More...
 
bool enabled () const
 Checks if the filter is enabled, disabled filters will be skipped. More...
 
const PostProcessFilterPtrfilter () const
 Returns a reference to the filter that owns this context. More...
 
Luminous::FrameBufferframeBuffer ()
 Returns the frame buffer used for rendering the scene.
 
const Luminous::FrameBufferframeBuffer () const
 Returns the frame buffer used for rendering the scene. More...
 
void initialize (Luminous::RenderContext &rc)
 Initializes the filter. More...
 
unsigned int order () const
 Returns the order of the filter corresponding to this context. More...
 
 PostProcessContext (const PostProcessFilterPtr filter)
 Creates a new post process filter. More...
 
const Luminous::Texturetexture () const
 Color buffer texture used for rendering the scene. More...
 

Detailed Description

PostProcessContext is the render-thread specific context that is used for post processing to work in a multi-context environment.

Use PostProcesFilter for defining custom filters.

Examples:
PostProcessingExample.cpp.

Constructor & Destructor Documentation

Luminous::PostProcessContext::PostProcessContext ( const PostProcessFilterPtr  filter)
explicit

Creates a new post process filter.

Parameters
filterfilter that this context belongs to

Member Function Documentation

void Luminous::PostProcessContext::doFilter ( Luminous::RenderContext rc)

Performs the filtering operation by setting the style values and calling PostProcessFilter::filter()

Parameters
rcContext of the current render thread
bool Luminous::PostProcessContext::enabled ( ) const

Checks if the filter is enabled, disabled filters will be skipped.

Returns
true if enabled, false otherwise.
const PostProcessFilterPtr& Luminous::PostProcessContext::filter ( ) const

Returns a reference to the filter that owns this context.

Returns
filter pointer to post-process filter
const Luminous::FrameBuffer& Luminous::PostProcessContext::frameBuffer ( ) const

Returns the frame buffer used for rendering the scene.

void Luminous::PostProcessContext::initialize ( Luminous::RenderContext rc)

Initializes the filter.

By default attaches a color and depth attachments to the frame buffer and resizes the frame buffer and attachments.

Parameters
rcContext of the current render thread
unsigned int Luminous::PostProcessContext::order ( ) const

Returns the order of the filter corresponding to this context.

Returns
order index
const Luminous::Texture& Luminous::PostProcessContext::texture ( ) const

Color buffer texture used for rendering the scene.

Use this texture as the source for the post processing filter.

Returns
color buffer texture