3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/client/renderer/texture/IResourceWatcher.h"
7#include "mc/client/renderer/texture/TextureAtlasStatus.h"
8#include "mc/client/renderer/texture/TextureHotReloaderMode.h"
9#include "mc/deps/core/resource/ResourceLocation.h"
10#include "mc/deps/core/utility/EnableNonOwnerReferences.h"
11#include "mc/deps/core_graphics/MipMapSupport.h"
12#include "mc/deps/core_graphics/ResourceLoader.h"
26namespace mce {
struct Image; }
32 using StatusCallbackType = void(::TextureAtlasStatus
const&);
34 using ReloadCallbackType = void(::ResourceLocation
const&);
36 using TextureAtlasTaskEnqueueType = void(::TextureAtlasResourceCallbacks);
38 using TextureAtlasReloadCallbackType = void(
39 ::ResourceLocation
const&,
40 ::std::shared_ptr<::cg::ImageBuffer>,
41 ::std::shared_ptr<::std::unordered_map<::ResourceLocation, ::cg::TextureSetImageContainer>>
47 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::std::map<::ResourceLocation, ::cg::ImageBuffer>>> mCachedTextures;
51 ::std::unique_ptr<::mce::IResourceWatcher<
53 ::std::shared_ptr<::mce::Image>,
57 ::std::vector<uchar>>,
58 ::ImageResourceManager>>>
60 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ImageResourceManager>> mImageResourceManager;
61 ::ll::TypedStorage<8, 64, ::std::unordered_map<::ResourceLocation, ::mce::FileWatcherHandle>> mFileWatcherHandles;
62 ::ll::TypedStorage<4, 4, ::TextureHotReloaderMode const> mMode;
72 MCAPI TextureHotReloader(
73 ::std::unique_ptr<::mce::IResourceWatcher<
75 ::std::shared_ptr<::mce::Image>,
79 ::std::vector<uchar>>,
80 ::ImageResourceManager>> imageWatcher,
81 ::TextureHotReloaderMode mode
84 MCAPI
void cacheTextures(::std::shared_ptr<::mce::TextureGroup> textureGroup);
87 isFileWatched(::ResourceLocation
const& resloc, ::IResourceLocationExpander
const& resourceLocationExpander);
89 MCAPI
void loadCachedTextureData(::std::shared_ptr<::mce::TextureGroup> textureGroup);
91 MCAPI
void registerAtlas(
92 ::TextureAtlas& textureAtlas,
93 ::std::shared_ptr<::mce::TextureGroup> textureGroup,
94 ::IResourceLocationExpander
const& resourceLocationExpander,
95 ::cg::MipMapSupport
const& mipMapSupport,
96 ::std::function<
void(::TextureAtlasResourceCallbacks)> textureAtlasTaskEnqueueCallback,
97 ::std::function<
void(::TextureAtlasStatus
const&)> textureAtlasStatusCallback,
99 ::ResourceLocation
const&,
100 ::std::shared_ptr<::cg::ImageBuffer>,
101 ::std::shared_ptr<::std::unordered_map<::ResourceLocation, ::cg::TextureSetImageContainer>>
102 )> textureAtlasReloadCallback
105 MCAPI
void registerTexture(
106 ::ResourceLocation
const& resLoc,
107 ::std::shared_ptr<::mce::TextureGroup> textureGroup,
108 ::IResourceLocationExpander
const& resourceLocationExpander,
109 ::std::function<
void(::ResourceLocation
const&)> textureReloadCallback
117 ::std::unique_ptr<::mce::IResourceWatcher<
118 ::cg::ResourceLoader<
119 ::std::shared_ptr<::mce::Image>,
122 ::StbImageLoadPolicy,
123 ::std::vector<uchar>>,
124 ::ImageResourceManager>> imageWatcher,
125 ::TextureHotReloaderMode mode
Definition EnableNonOwnerReferences.h:7
Definition IResourceLocationExpander.h:5
Definition TextureAtlas.h:5
Definition ImageBuffer.h:16
Definition TextureSetImageContainer.h:20
Definition FileWatcherHandle.h:12
Definition TextureGroup.h:7
Definition ImageResourceManager.h:5
Definition StbImageLoadPolicy.h:5
Definition StdIoStreamPolicy.h:5
Definition TextureAtlasResourceCallbacks.h:5
Definition TextureHotReloader.h:5