VideoCommon: use CustomResourceManager in the texture cache and hook up to our hires textures

This commit is contained in:
iwubcode
2025-03-01 21:55:07 -06:00
parent 12d178a8df
commit 7afa9e6c6f
4 changed files with 63 additions and 116 deletions

View File

@ -9,8 +9,8 @@
#include <vector>
#include "Common/CommonTypes.h"
#include "VideoCommon/Assets/CustomResourceManager.h"
#include "VideoCommon/Assets/CustomTextureData.h"
#include "VideoCommon/Assets/TextureAsset.h"
#include "VideoCommon/TextureConfig.h"
#include "VideoCommon/TextureInfo.h"
@ -27,12 +27,13 @@ public:
static void Shutdown();
static std::shared_ptr<HiresTexture> Search(const TextureInfo& texture_info);
HiresTexture(bool has_arbitrary_mipmaps, std::shared_ptr<VideoCommon::GameTextureAsset> asset);
HiresTexture(bool has_arbitrary_mipmaps, std::string id);
bool HasArbitraryMipmaps() const { return m_has_arbitrary_mipmaps; }
const std::shared_ptr<VideoCommon::GameTextureAsset>& GetAsset() const { return m_game_texture; }
VideoCommon::CustomResourceManager::TextureTimePair LoadTexture() const;
const std::string& GetId() const { return m_id; }
private:
bool m_has_arbitrary_mipmaps = false;
std::shared_ptr<VideoCommon::GameTextureAsset> m_game_texture;
std::string m_id;
};