| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
#pragma once |
| 5 |
|
| 6 |
#include <span> |
| 7 |
#include <string> |
| 8 |
|
| 9 |
#include "Common/Buffer.h" |
| 10 |
#include "Common/CommonTypes.h" |
| 11 |
#include "VideoCommon/TextureConfig.h" |
| 12 |
|
| 13 |
namespace VideoCommon |
| 14 |
{ |
| 15 |
class CustomTextureData |
| 16 |
{ |
| 17 |
public: |
| 18 |
struct ArraySlice |
| 19 |
{ |
| 20 |
struct Level |
| 21 |
{ |
| 22 |
Common::UniqueBuffer<u8> data; |
| 23 |
AbstractTextureFormat format = AbstractTextureFormat::RGBA8; |
| 24 |
u32 width = 0; |
| 25 |
u32 height = 0; |
| 26 |
u32 row_length = 0; |
| 27 |
}; |
| 28 |
std::vector<Level> m_levels; |
| 29 |
}; |
| 30 |
std::vector<ArraySlice> m_slices; |
| 31 |
}; |
| 32 |
|
| 33 |
bool LoadDDSTexture(CustomTextureData* texture, const std::string& filename); |
| 34 |
bool LoadDDSTexture(CustomTextureData::ArraySlice::Level* level, const std::string& filename, |
| 35 |
u32 mip_level); |
| 36 |
bool LoadPNGTexture(CustomTextureData::ArraySlice::Level* level, const std::string& filename); |
| 37 |
bool LoadPNGTexture(CustomTextureData::ArraySlice::Level* level, std::span<const u8> buffer); |
| 38 |
} |