Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11612 from iwubcode/custom_texture_data
VideoCommon: move hirestexture data to reusable class called CustomTextureData
- Loading branch information
Showing
7 changed files
with
130 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
Source/Core/VideoCommon/GraphicsModSystem/Runtime/CustomTextureData.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
Oops, something went wrong.