载入中...
搜索中...
未找到
EvpackImageLoader.h
浏览该文件的文档.
1#pragma once
2#include "common/Export.h"
3
4
9
10namespace eve::graphics {
11class IResourceFactory;
12}
13
14namespace eve::asset_graphics {
15
17
24
27public:
31 : factory_(factory) {}
32
39 [[nodiscard]] Result<graphics::Texture*> uploadRgba8(
40 std::uint32_t width, std::uint32_t height, const std::uint8_t* pixels,
41 bool srgb) override;
42
45 [[nodiscard]] Result<graphics::Texture*> uploadRgba8MipChain(uint32_t width, uint32_t height, uint32_t levels,
46 std::span<const uint8_t> pixels) override;
47
50 [[nodiscard]] Result<graphics::Texture*> uploadRgba8Volume(uint32_t width, uint32_t height, uint32_t depth,
51 std::span<const uint8_t> pixels) override;
52
58 [[nodiscard]] Result<void> releaseImage(graphics::Texture* texture) override;
59
60private:
62};
63
66public:
69 graphics::IImageResourceFactory& factory) noexcept
71 : reader_(reader), factory_(factory) {}
72
78 [[nodiscard]] Result<LoadedGraphicsImage> load(
79 const AssetRef& image, const asset::EvpackCapabilities& capabilities,
80 const ImageAssetLoadLimits& limits = {}) const;
81
82private:
83 const asset::EvpackResourceReader& reader_;
85};
86
89 std::uint32_t maximumDimension = 2048;
90 std::uint64_t maximumVoxels = 268'435'456;
91 std::uint64_t maximumDecodedBytes = 1024ull * 1024ull * 1024ull;
92};
93
100
103public:
106 graphics::IImageResourceFactory& factory) noexcept
108 : reader_(reader), factory_(factory) {}
109
120 [[nodiscard]] Result<LoadedGraphicsVolumeTexture> load(const AssetRef& volume,
121 const asset::EvpackCapabilities& capabilities,
122 const VolumeTextureAssetLoadLimits& limits = {}) const;
123
124private:
125 const asset::EvpackResourceReader& reader_;
127};
128
129} // namespace eve::asset_graphics
double volume
Backend-neutral canonical EVIMG decoding.
#define EVENGINE_API_WORLD
Definition Export.h:109
vk::UniqueImage image
Result-based graphics boundary for runtime image assets.
std::uint32_t height
std::uint32_t width
uint8_t * pixels
std::uint32_t depth
const AssetImportLimits & limits
Stable asset identity backed by PersistentId.
Definition ResourceRef.h:53
Move-only operation result carrying either a value or Status.
Definition Result.h:155
Immutable reader retaining an admitted pack by shared ownership.
Capability-aware adapter from admitted EVIMG assets to backend textures.
EvpackImageLoader(const asset::EvpackResourceReader &reader, graphics::IImageResourceFactory &factory) noexcept
Bind borrowed reader and image factory; both must outlive this loader.
Capability-aware loader for canonical volume-texture/1 assets.
EvpackVolumeTextureLoader(const asset::EvpackResourceReader &reader, graphics::IImageResourceFactory &factory) noexcept
Bind borrowed reader and image factory; both must outlive this loader.
Result-based adapter over the engine's established graphics resource factory.
GraphicsImageFactoryAdapter(graphics::IResourceFactory &factory) noexcept
Bind a borrowed graphics factory that must outlive this adapter.
Backend-owned RGBA8 texture upload and release operations.
Texture / mesh / shader / canvas creation and release.
GPU texture created via Graphics::newTexture. Owns GPU resources through an opaque backend handle.
Definition Texture.h:18
卡牌游戏 UI 工具模块:工厂 + 脚本绑定入口。 功能参考 ycarowr/UiCard:扇形手牌布局、抽牌/洗牌、悬浮放大、拖拽到落牌区、 敌方手牌(背面/偷看)、费用不足置灰,以及可实时调节的布局...
Definition Animation.h:25
Actual runtime device capabilities used for variant selection.
Definition Evpack.h:92
Bounds applied before allocating decoded image bytes.
Result of ordered capability variant selection.
Definition Evpack.h:155
Successfully uploaded texture and selected capability variant.
asset::EvpackVariantSelection variant
Successfully uploaded volume texture and selected capability variant.
Bounds checked before backend volume allocation.