diff options
author | dec05eba <dec05eba@protonmail.com> | 2024-07-31 20:56:23 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2024-07-31 20:56:29 +0200 |
commit | be41f208c6660a879818321e2904795c7d45fe3e (patch) | |
tree | 18b609910be3ca02cfbc6928d8db7c6afd0972f8 /src/graphics/Sprite.cpp | |
parent | 6c79d44732272b4d8a28abe89a78692a6b7c5cc4 (diff) |
Add mipmap, texture load from memory
Diffstat (limited to 'src/graphics/Sprite.cpp')
-rw-r--r-- | src/graphics/Sprite.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/graphics/Sprite.cpp b/src/graphics/Sprite.cpp index f2ba460..de9e96c 100644 --- a/src/graphics/Sprite.cpp +++ b/src/graphics/Sprite.cpp @@ -35,10 +35,8 @@ namespace mgl { } vec2f Sprite::get_size() const { - if(texture) - return get_scale() * mgl::vec2f(texture->get_size().x, texture->get_size().y); - else - return { 0.0f, 0.0f }; + const mgl_vec2f v = mgl_sprite_get_size(&sprite); + return { v.x, v.y }; } void Sprite::set_scale(vec2f scale) { |