LeviLamina
Loading...
Searching...
No Matches
ImageResourceLoader.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/image/ImageFormat.h"
7#include "mc/external/render_dragon/texture_streaming/texture_cache/TextureCache.h"
8
9// auto generated forward declare list
10// clang-format off
12namespace cg { class ImageResource; }
13namespace dragon::texturestreaming { struct DragonTextureCacheContext; }
14// clang-format on
15
16namespace mce {
17
18class ImageResourceLoader {
19public:
20 // ImageResourceLoader inner types define
21 enum class LoadError : int {
22 TextureConversionError = 0,
23 };
24
25public:
26 // member variables
27 // NOLINTBEGIN
30 // NOLINTEND
31
32public:
33 // prevent constructor by default
34 ImageResourceLoader& operator=(ImageResourceLoader const&);
35 ImageResourceLoader(ImageResourceLoader const&);
36 ImageResourceLoader();
37
38public:
39 // member functions
40 // NOLINTBEGIN
41 MCNAPI_C ::nonstd::expected<::std::shared_ptr<::cg::ImageResource>, ::std::error_condition>
42 loadImageResourceFromMemory(::std::string const& fileContents, bool tryStreamed);
43
44 MCNAPI_C ::nonstd::expected<::std::shared_ptr<::cg::ImageResource>, ::std::error_condition>
45 loadImageWithoutExtension(
46 ::ResourceLocation const& resourceLocation,
47 bool tryStreamed,
48 ::std::optional<::mce::ImageFormat> desiredImageFormat,
49 bool splitAsArray
50 );
51
52 MCNAPI_C void setTextureCache(
53 ::std::shared_ptr<
55 textureCache
56 );
57 // NOLINTEND
58};
59
60} // namespace mce
Definition ResourceLocation.h:15
Definition ImageResource.h:12
Definition TextureCache.h:8
Definition DragonTextureCacheContext.h:7
Definition Alias.h:14