diff --git a/libs/gfx/include/psemek/gfx/texture_atlas.hpp b/libs/gfx/include/psemek/gfx/texture_atlas.hpp index d7638a89..05c3f3d0 100644 --- a/libs/gfx/include/psemek/gfx/texture_atlas.hpp +++ b/libs/gfx/include/psemek/gfx/texture_atlas.hpp @@ -10,7 +10,9 @@ namespace psemek::gfx template > struct texture_atlas_2d { - texture_atlas_2d(Pixel background = Pixel{}, Compare compare = Compare{}); + using atlas_type = util::atlas; + + texture_atlas_2d(Pixel background = Pixel{}, std::size_t padding = 0, atlas_type::padding_mode mode = atlas_type::padding_mode::default_value, Compare compare = Compare{}); using texture_view = texture_view_2d; @@ -24,7 +26,7 @@ namespace psemek::gfx std::size_t used_pixels() const { return used_pixels_; } private: - util::atlas atlas_; + atlas_type atlas_; texture_2d texture_; std::size_t used_pixels_ = 0; @@ -34,8 +36,8 @@ namespace psemek::gfx }; template - texture_atlas_2d::texture_atlas_2d(Pixel background, Compare compare) - : atlas_(std::move(background), std::move(compare)) + texture_atlas_2d::texture_atlas_2d(Pixel background, std::size_t padding, atlas_type::padding_mode mode, Compare compare) + : atlas_(std::move(background), padding, mode, std::move(compare)) {} template