From 95dc09d7a37668ea74d2f8f320c999b52eec7f3b Mon Sep 17 00:00:00 2001 From: lisyarus Date: Mon, 12 Jun 2023 01:36:23 +0300 Subject: [PATCH] Support retrieving the underlying pixmap from a texture atlas --- libs/gfx/include/psemek/gfx/texture_atlas.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libs/gfx/include/psemek/gfx/texture_atlas.hpp b/libs/gfx/include/psemek/gfx/texture_atlas.hpp index e9832a1b..b46d81b4 100644 --- a/libs/gfx/include/psemek/gfx/texture_atlas.hpp +++ b/libs/gfx/include/psemek/gfx/texture_atlas.hpp @@ -19,6 +19,8 @@ namespace psemek::gfx texture_2d & texture() { return texture_; } texture_2d const & texture() const { return texture_; } + util::array const & pixmap() const { return atlas_.array(); } + std::pair insert(Key const & key, util::array const & data); texture_view find(Key const & key) const; texture_view at(Key const & key) const;