LeviLamina
Loading...
Searching...
No Matches
CubemapBackgroundResources.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/math/Color.h"
7#include "mc/deps/core/resource/ResourceLocation.h"
8#include "mc/deps/core/utility/EnableNonOwnerReferences.h"
9#include "mc/deps/core/utility/NonOwnerPointer.h"
10#include "mc/deps/minecraft_renderer/renderer/TexturePtr.h"
11#include "mc/deps/minecraft_renderer/resources/ClientTexture.h"
12#include "mc/resources/ResourcePackListener.h"
13
14// auto generated forward declare list
15// clang-format off
17class IClientInstance;
19namespace mce { class TextureGroup; }
20namespace mce { struct TextureResourceService; }
21// clang-format on
22
24public:
25 // CubemapBackgroundResources inner types define
26 enum class CubemapType : int {
27 Sdr = 0,
28 Hdr = 1,
29 };
30
31public:
32 // member variables
33 // NOLINTBEGIN
34 ::ll::TypedStorage<1, 1, bool> mIsVanillaCubemap;
35 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::ResourcePackManager>> mResourcePackManager;
36 ::ll::TypedStorage<8, 192, ::std::array<::mce::TexturePtr, 6>> mPanoramaImages;
37 ::ll::TypedStorage<8, 336, ::std::array<::ResourceLocation, 6>> mPanormaResourceLocations;
38 ::ll::TypedStorage<8, 336, ::std::array<::ResourceLocation, 6>> mPanoramaHDRResourceLocations;
39 ::ll::TypedStorage<8, 24, ::mce::ClientTexture> mCubemapTexture;
40 ::ll::TypedStorage<8, 56, ::ResourceLocation> mOverlayLocation;
41 ::ll::TypedStorage<8, 32, ::mce::TexturePtr> mOverlayTexture;
42 ::ll::TypedStorage<4, 4, int> mTextureRefCount;
43 ::ll::TypedStorage<1, 1, bool> mPrimaryClientUnloaded;
44 ::ll::TypedStorage<1, 1, bool> mPendingRecreateCubemap;
45 ::ll::TypedStorage<1, 2, ::std::optional<bool>> mHDRTexturesUnavailable;
46 ::ll::TypedStorage<4, 4, ::CubemapBackgroundResources::CubemapType> mCubemapType;
47 ::ll::TypedStorage<4, 16, ::mce::Color> mFadeInColor;
48 // NOLINTEND
49
50public:
51 // prevent constructor by default
52 CubemapBackgroundResources();
53
54public:
55 // virtual functions
56 // NOLINTBEGIN
57 virtual ~CubemapBackgroundResources() /*override*/ = default;
58
59 virtual void onActiveResourcePacksChanged(::ResourcePackManager&) /*override*/;
60 // NOLINTEND
61
62public:
63 // member functions
64 // NOLINTBEGIN
65 MCAPI CubemapBackgroundResources(
66 ::std::shared_ptr<::mce::TextureGroup> textureGroup,
67 ::ResourcePackManager& resourcePackManager,
68 ::CubemapBackgroundResources::CubemapType const& cubemapType
69 );
70
71 MCAPI void _checkHDRTexturesAvailableAndFallback(::std::shared_ptr<::mce::TextureGroup> textureGroup);
72
73 MCAPI void _unloadPanoramaTextures(::std::shared_ptr<::mce::TextureGroup> textureGroup);
74
75 MCAPI bool arePanoramaTexturesLoadedInGroup(::std::shared_ptr<::mce::TextureGroup> textures) const;
76
77 MCAPI void frameUpdate(::IClientInstance& clientInstance, ::FrameUpdateContext& frameUpdateContext);
78
79 MCAPI void loadAssets(
80 ::mce::TextureResourceService& textureResourceService,
81 ::std::shared_ptr<::mce::TextureGroup> textureGroup
82 );
83
84 MCAPI void unloadAssets(::std::shared_ptr<::mce::TextureGroup> textureGroup);
85
86 MCAPI void updateAssets(::std::shared_ptr<::mce::TextureGroup> textureGroup);
87
88 MCAPI void updateCubemapType(
89 ::CubemapBackgroundResources::CubemapType const& cubemapType,
90 ::std::shared_ptr<::mce::TextureGroup> textureGroup
91 );
92 // NOLINTEND
93
94public:
95 // constructor thunks
96 // NOLINTBEGIN
97 MCAPI void* $ctor(
98 ::std::shared_ptr<::mce::TextureGroup> textureGroup,
99 ::ResourcePackManager& resourcePackManager,
100 ::CubemapBackgroundResources::CubemapType const& cubemapType
101 );
102 // NOLINTEND
103
104public:
105 // virtual function thunks
106 // NOLINTBEGIN
107 MCAPI void $onActiveResourcePacksChanged(::ResourcePackManager&);
108 // NOLINTEND
109};
Definition EnableNonOwnerReferences.h:7
Definition CubemapBackgroundResources.h:5
Definition FrameUpdateContext.h:5
Definition IClientInstance.h:5
Definition ResourcePackListener.h:10
Definition ResourcePackManager.h:38
Definition TextureGroup.h:7
Definition TextureResourceService.h:7