diff options
| author | iwubcode <iwubcode@users.noreply.github.com> | 2023-08-13 16:09:45 -0500 |
|---|---|---|
| committer | iwubcode <iwubcode@users.noreply.github.com> | 2023-09-02 20:20:09 -0500 |
| commit | 62fee2f3b60c84b27efbb0792e3695bbe812ac1a (patch) | |
| tree | 1ba80d4b42fefe1a9525dec7884938eb0c840ef1 /Source/Core/VideoCommon/Assets/CustomTextureData.h | |
| parent | 5e5887a378db28324a8fc8825f21539525412e12 (diff) | |
VideoCommon: add loading cube maps from DDS files and loading it into our custom texture object. Custom texture object now has the concept of slices in addition to levels. Traditional custom textures have a single slice
Diffstat (limited to 'Source/Core/VideoCommon/Assets/CustomTextureData.h')
| -rw-r--r-- | Source/Core/VideoCommon/Assets/CustomTextureData.h | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/Source/Core/VideoCommon/Assets/CustomTextureData.h b/Source/Core/VideoCommon/Assets/CustomTextureData.h index b7fd6f379e..fe15c05eaa 100644 --- a/Source/Core/VideoCommon/Assets/CustomTextureData.h +++ b/Source/Core/VideoCommon/Assets/CustomTextureData.h @@ -14,18 +14,23 @@ namespace VideoCommon class CustomTextureData { public: - struct Level + struct ArraySlice { - std::vector<u8> data; - AbstractTextureFormat format = AbstractTextureFormat::RGBA8; - u32 width = 0; - u32 height = 0; - u32 row_length = 0; + struct Level + { + std::vector<u8> data; + AbstractTextureFormat format = AbstractTextureFormat::RGBA8; + u32 width = 0; + u32 height = 0; + u32 row_length = 0; + }; + std::vector<Level> m_levels; }; - std::vector<Level> m_levels; + std::vector<ArraySlice> m_slices; }; bool LoadDDSTexture(CustomTextureData* texture, const std::string& filename); -bool LoadDDSTexture(CustomTextureData::Level* level, const std::string& filename, u32 mip_level); -bool LoadPNGTexture(CustomTextureData::Level* level, const std::string& filename); +bool LoadDDSTexture(CustomTextureData::ArraySlice::Level* level, const std::string& filename, + u32 mip_level); +bool LoadPNGTexture(CustomTextureData::ArraySlice::Level* level, const std::string& filename); } // namespace VideoCommon |
