diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-02-27 01:47:12 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-02-27 01:47:12 +0100 |
commit | 41100a2071a9a6cec08c815513acacfacc6c90c0 (patch) | |
tree | fb634a43e4cd73e0cc5c312ef97e42e8ee1aef2d | |
parent | d2f67e7fb0b0729cd09e1a3193f729cdc755f83c (diff) |
loader: expose texture()
-rw-r--r-- | loader/impl.hpp | 2 | ||||
-rw-r--r-- | loader/loader.hpp | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/loader/impl.hpp b/loader/impl.hpp index 8fa650ea..98ec8ac0 100644 --- a/loader/impl.hpp +++ b/loader/impl.hpp @@ -31,7 +31,7 @@ struct loader_impl final : loader_ String original_working_directory; StringView shader(StringView filename) noexcept override; - Trade::ImageData2D texture(StringView prefix, StringView filename) noexcept(false); + Trade::ImageData2D texture(StringView prefix, StringView filename) noexcept(false) override; std::shared_ptr<struct tile_atlas> tile_atlas(StringView filename, Vector2ub size, Optional<pass_mode> pass) noexcept(false) override; std::shared_ptr<struct tile_atlas> tile_atlas(StringView filename) noexcept(false) override; ArrayView<String> anim_atlas_list() override; diff --git a/loader/loader.hpp b/loader/loader.hpp index fadccb45..843d0a72 100644 --- a/loader/loader.hpp +++ b/loader/loader.hpp @@ -6,6 +6,10 @@ namespace Magnum { using Vector2ub = Math::Vector2<unsigned char>; } namespace floormat { struct serialized_scenery; } +namespace Magnum::Trade { +template<std::uint32_t> class ImageData; +using ImageData2D = ImageData<2>; +} // namespace Magnum::Trade namespace floormat { @@ -16,6 +20,7 @@ struct scenery_proto; struct loader_ { virtual StringView shader(StringView filename) noexcept = 0; + virtual Trade::ImageData2D texture(StringView prefix, StringView filename) noexcept(false) = 0; virtual std::shared_ptr<struct tile_atlas> tile_atlas(StringView filename, Vector2ub size, Optional<pass_mode> pass) noexcept(false) = 0; virtual std::shared_ptr<struct tile_atlas> tile_atlas(StringView filename) noexcept(false) = 0; virtual ArrayView<String> anim_atlas_list() = 0; |