Support texture resizing.
This commit is contained in:
parent
e2bd48ec90
commit
739b75b0b6
8 changed files with 29 additions and 14 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue