mirror of
https://github.com/libSDL2pp/libSDL2pp.git
synced 2025-08-03 19:05:59 -04:00
Add a way to reset render target to default (e.g. screen)
This commit is contained in:
parent
150830b270
commit
acebd488aa
@ -74,6 +74,11 @@ void Renderer::SetDrawColor(Uint8 r, Uint8 g, Uint8 b, Uint8 a) {
|
||||
throw Exception("SDL_SetRenderDrawColor failed");
|
||||
}
|
||||
|
||||
void Renderer::SetTarget() {
|
||||
if (SDL_SetRenderTarget(renderer_, nullptr) != 0)
|
||||
throw Exception("SDL_SetRenderTarget failed");
|
||||
}
|
||||
|
||||
void Renderer::SetTarget(Texture& texture) {
|
||||
if (SDL_SetRenderTarget(renderer_, texture.Get()) != 0)
|
||||
throw Exception("SDL_SetRenderTarget failed");
|
||||
|
@ -56,6 +56,7 @@ public:
|
||||
void Copy(Texture& texture, const Rect& srcrect, const Rect& dstrect, double angle, const Point& center, SDL_RendererFlip flip);
|
||||
|
||||
void SetDrawColor(Uint8 r, Uint8 g, Uint8 b, Uint8 a = 255);
|
||||
void SetTarget();
|
||||
void SetTarget(Texture& texture);
|
||||
|
||||
void SetDrawBlendMode(SDL_BlendMode blendMode);
|
||||
|
Loading…
x
Reference in New Issue
Block a user