Support texture resizing.

This commit is contained in:
King_DuckZ 2014-02-22 12:25:16 +01:00
parent e2bd48ec90
commit 739b75b0b6
8 changed files with 29 additions and 14 deletions

View file

@ -223,9 +223,9 @@ namespace cloonel {
///--------------------------------------------------------------------------
///--------------------------------------------------------------------------
void Texture::Render (int2 parPos) const {
void Texture::Render (int2 parPos, ushort2 parSize) const {
assert(IsLoaded());
const SDL_Rect dest = { parPos.x(), parPos.y(), m_size.x(), m_size.y() };
const SDL_Rect dest = { parPos.x(), parPos.y(), parSize.x(), parSize.y() };
SDL_RenderCopy(m_sdlmain->GetRenderer(), m_texture, nullptr, &dest);
}
} //namespace cloonel