HiresTextures: Load full mipmap chain from DDS files

This removes the need for multiple texture files to store the mipmap
chain for a texture. As many mipmaps will be loaded as are present in
the DDS file, and any remaining mipmaps will fall back to the old
behavior.
This commit is contained in:
Stenzek
2017-04-17 00:24:16 +10:00
parent c53a60f3c3
commit 8761c8244d
3 changed files with 236 additions and 85 deletions

View File

@ -47,7 +47,8 @@ public:
private:
static std::unique_ptr<HiresTexture> Load(const std::string& base_filename, u32 width,
u32 height);
static bool LoadDDSTexture(Level& level, const std::vector<u8>& buffer);
static bool LoadDDSTexture(HiresTexture* tex, const std::string& filename);
static bool LoadDDSTexture(Level& level, const std::string& filename);
static bool LoadTexture(Level& level, const std::vector<u8>& buffer);
static void Prefetch();