summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/GraphicsModSystem/Runtime/CustomTextureData.h
diff options
context:
space:
mode:
authorMai <mai.iam2048@gmail.com>2023-03-02 15:05:46 -0500
committerGitHub <noreply@github.com>2023-03-02 15:05:46 -0500
commitcbbc518bc45ab2f9a9f97b14be89d944c6f2bdf0 (patch)
treed42f612806df65f859b66d2653856bd7c6bdcd2e /Source/Core/VideoCommon/GraphicsModSystem/Runtime/CustomTextureData.h
parent78e8669bac069374ee87ecafddba114928d72687 (diff)
parent42cb3f39046af5d0cfe3fae05e2e2ba98d80d367 (diff)
Merge pull request #11612 from iwubcode/custom_texture_data
VideoCommon: move hirestexture data to reusable class called CustomTextureData
Diffstat (limited to 'Source/Core/VideoCommon/GraphicsModSystem/Runtime/CustomTextureData.h')
-rw-r--r--Source/Core/VideoCommon/GraphicsModSystem/Runtime/CustomTextureData.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/Source/Core/VideoCommon/GraphicsModSystem/Runtime/CustomTextureData.h b/Source/Core/VideoCommon/GraphicsModSystem/Runtime/CustomTextureData.h
new file mode 100644
index 0000000000..9a16bf1db0
--- /dev/null
+++ b/Source/Core/VideoCommon/GraphicsModSystem/Runtime/CustomTextureData.h
@@ -0,0 +1,32 @@
+// Copyright 2023 Dolphin Emulator Project
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#include <string>
+#include <vector>
+
+#include "Common/CommonTypes.h"
+#include "VideoCommon/TextureConfig.h"
+
+namespace VideoCommon
+{
+class CustomTextureData
+{
+public:
+ 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;
+};
+
+bool LoadDDSTexture(CustomTextureData* texture, const std::string& filename);
+bool LoadDDSTexture(CustomTextureData::Level* level, const std::string& filename, u32 mip_level);
+bool LoadPNGTexture(CustomTextureData* texture, const std::string& filename);
+bool LoadPNGTexture(CustomTextureData::Level* level, const std::string& filename);
+} // namespace VideoCommon