VideoCommon: separate the concept of a 'resource' from an 'asset'. A resource is potentially multiple assets that are chained together but represent one type of data to the rest of the system. An example is a 'material'. A 'material' is a collection of textures, a custom shader, and some metadata that all comes together to form what the concept of the material is. There will be a 'material' resource. For now, start small by introducing the interface and change our texture loading which used assets from the old resource manager, to an actual resource.

This commit is contained in:
iwubcode
2025-11-23 11:04:24 -06:00
parent 59d9c1772a
commit 2d21a99205
17 changed files with 559 additions and 153 deletions
+6 -5
View File
@@ -8,12 +8,13 @@
#include <string>
#include <vector>
#include "Common/CommonTypes.h"
#include "VideoCommon/Assets/CustomResourceManager.h"
#include "VideoCommon/Assets/CustomTextureData.h"
#include "VideoCommon/TextureConfig.h"
#include "VideoCommon/TextureInfo.h"
namespace VideoCommon
{
class TextureDataResource;
}
enum class TextureFormat;
std::set<std::string> GetTextureDirectoriesWithGameId(const std::string& root_directory,
@@ -30,7 +31,7 @@ public:
HiresTexture(bool has_arbitrary_mipmaps, std::string id);
bool HasArbitraryMipmaps() const { return m_has_arbitrary_mipmaps; }
VideoCommon::CustomResourceManager::TextureTimePair LoadTexture() const;
VideoCommon::TextureDataResource* LoadTexture() const;
const std::string& GetId() const { return m_id; }
private: