This class provides a simple guard for setting the active viewport. More...
#include <Luminous/RenderContext.hpp>
Public Member Functions | |
| ViewportGuard (RenderContext &r, const Nimble::Recti &viewport) | |
| Construct a new guard. More... | |
| ViewportGuard (ViewportGuard &&rhs) | |
| Construct a guard by moving. More... | |
| ~ViewportGuard () | |
| Destructor. This function automatically calls RenderContext::popViewport(). | |
This class provides a simple guard for setting the active viewport.
It will automatically pop the viewport in its destructor so the user doesn't need to remember to do it manually. It is equivalent to calling "RenderContext::pushViewport(const Nimble::Recti &)" and "RenderContext::popViewport"
|
inline |
Construct a new guard.
| r | render context |
|
inline |
Construct a guard by moving.
| rhs | guard to move |