mirror of
https://github.com/libSDL2pp/libSDL2pp.git
synced 2025-09-12 00:35:09 -04:00
Add method to retrieve SDL_RendererInfo
This commit is contained in:
parent
92925a9620
commit
7698a2522e
@ -59,6 +59,11 @@ void Renderer::Clear() {
|
||||
throw Exception("SDL_RenderClear failed");
|
||||
}
|
||||
|
||||
void Renderer::GetInfo(SDL_RendererInfo* info) {
|
||||
if (SDL_GetRendererInfo(renderer_, info) != 0)
|
||||
throw Exception("SDL_GetRendererInfo failed");
|
||||
}
|
||||
|
||||
void Renderer::Copy(Texture& texture, const Rect& srcrect, const Rect& dstrect) {
|
||||
if (SDL_RenderCopy(renderer_, texture.Get(), srcrect.Get(), dstrect.Get()) != 0)
|
||||
throw Exception("SDL_RenderCopy failed");
|
||||
|
@ -52,6 +52,8 @@ public:
|
||||
void Present();
|
||||
void Clear();
|
||||
|
||||
void GetInfo(SDL_RendererInfo* info);
|
||||
|
||||
void Copy(Texture& texture, const Rect& srcrect, const Rect& dstrect);
|
||||
void Copy(Texture& texture, const Rect& srcrect, const Rect& dstrect, double angle, const Point& center, SDL_RendererFlip flip);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user