This class provides a simple guard for setting the active render target. More...
#include <Luminous/RenderContext.hpp>
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(). | |
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"
|
inline |
Construct a new guard.
| r | render context to pop a target from |
|
inline |
Construct a guard by moving.
| rhs | guard to move |