|
Rose
|
Store the current render target replacing it with a new render target. More...
#include <Renderer.h>

Public Member Functions | |
| RenderTargetGuard ()=delete | |
| Deleted default constructor. | |
| RenderTargetGuard (const RenderTargetGuard &)=delete | |
| Deleted copy constructor. | |
| ~RenderTargetGuard () noexcept(false) | |
| Set the old render target back on the renderer when destroyed. | |
| operator bool () const noexcept | |
| Test the status of the RenderTargetGuard. More... | |
| RenderTargetGuard (Renderer &renderer, Texture &texture) | |
| Constructor. More... | |
| void | clear () |
| Clear the render target so rendering will be sent to the screen backing buffer. | |
| int | setRenderTarget (Texture &texture) |
| Set a new render target without pushing it on the stack. More... | |
Protected Attributes | |
| Renderer & | mRenderer |
| The Renderer being guarded. | |
| bool | popped {false} |
| True if the target guard has already been popped off the stack. | |
| int | status {0} |
| The return status from the last SDL API call. | |
Store the current render target replacing it with a new render target.
When the object is destroyed (by going out of scope) the old render target is restored.
Constructor.
| renderer | The renderer which render target will be managed. |
| texture | The texture which will become the new render target. |
|
inlineexplicitnoexcept |
Test the status of the RenderTargetGuard.
The status is good (true is returned) if the status value returned from the last operation on the Renderer object returned 0.
| int rose::sdl::RenderTargetGuard::setRenderTarget | ( | Texture & | texture | ) |
Set a new render target without pushing it on the stack.
This may be used when a number of render target changes are needed in a context block. A RenderTargetGuard is created, calls to setRenderTarget are used to manipulate the render target. When the RenderTargetGuard goes out of scope the original render target is restored.
| texture |
1.8.13