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

This class provides a simple guard for setting the active render target. More...

#include <Luminous/RenderContext.hpp>

Inheritance diagram for Luminous::FrameBufferGuard:
Patterns::NotCopyable

Public Member Functions

 FrameBufferGuard (RenderContext &r, const FrameBuffer &target)
 Construct a new guard. More...
 
 FrameBufferGuard (FrameBufferGuard &&rhs)
 Construct a guard by moving. More...
 
 ~FrameBufferGuard ()
 Destructor. This function automatically calls RenderContext::popFrameBuffer().
 

Detailed Description

This class provides a simple guard for setting the active render target.

It will automatically pop the target in its destructor so the user doesn't need to remember to do it manually. It is equivalent to calling "RenderContext::pushFrameBuffer(const FrameBuffer &)" and "RenderContext::popFrameBuffer"

Constructor & Destructor Documentation

Luminous::FrameBufferGuard::FrameBufferGuard ( RenderContext r,
const FrameBuffer target 
)
inline

Construct a new guard.

Parameters
rrender context to pop a target from
Luminous::FrameBufferGuard::FrameBufferGuard ( FrameBufferGuard &&  rhs)
inline

Construct a guard by moving.

Parameters
rhsguard to move