Add method to retrieve SDL_RendererInfo

This commit is contained in:
Dmitry Marakasov 2013-12-18 04:40:01 +04:00
parent 92925a9620
commit 7698a2522e
2 changed files with 7 additions and 0 deletions

View File

@ -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");

View File

@ -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);