mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
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
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user