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