VideoCommon: instead of using 'CustomTextureData' directly, use 'TextureData' for texture assets, this allows us to provide additional metadata for textures. Such as a sampler or type information (to distinguish cube maps)

This commit is contained in:
iwubcode
2023-09-06 00:16:26 -05:00
parent 1b7a590b4b
commit 0e8f8ea930
13 changed files with 138 additions and 93 deletions

View File

@ -10,9 +10,9 @@
namespace VideoCommon
{
class CustomTextureData;
struct MaterialData;
struct PixelShaderData;
struct TextureData;
// This class provides functionality to load
// specific data (like textures). Where this data
@ -32,14 +32,14 @@ public:
};
// Loads a texture, if there are no levels, bytes loaded will be empty
virtual LoadInfo LoadTexture(const AssetID& asset_id, CustomTextureData* data) = 0;
virtual LoadInfo LoadTexture(const AssetID& asset_id, TextureData* data) = 0;
// Gets the last write time for a given asset id
virtual TimeType GetLastAssetWriteTime(const AssetID& asset_id) const = 0;
// Loads a texture as a game texture, providing additional checks like confirming
// each mip level size is correct and that the format is consistent across the data
LoadInfo LoadGameTexture(const AssetID& asset_id, CustomTextureData* data);
LoadInfo LoadGameTexture(const AssetID& asset_id, TextureData* data);
// Loads a pixel shader
virtual LoadInfo LoadPixelShader(const AssetID& asset_id, PixelShaderData* data) = 0;