| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
#pragma once |
| 5 |
|
| 6 |
#include <fmt/format.h> |
| 7 |
#include <picojson.h> |
| 8 |
|
| 9 |
#include "Common/EnumFormatter.h" |
| 10 |
#include "VideoCommon/Assets/CustomAsset.h" |
| 11 |
#include "VideoCommon/Assets/CustomTextureData.h" |
| 12 |
#include "VideoCommon/RenderState.h" |
| 13 |
|
| 14 |
namespace VideoCommon |
| 15 |
{ |
| 16 |
struct TextureAndSamplerData |
| 17 |
{ |
| 18 |
static bool FromJson(const CustomAssetLibrary::AssetID& asset_id, const picojson::object& json, |
| 19 |
TextureAndSamplerData* data); |
| 20 |
static void ToJson(picojson::object* obj, const TextureAndSamplerData& data); |
| 21 |
AbstractTextureType type; |
| 22 |
CustomTextureData texture_data; |
| 23 |
SamplerState sampler; |
| 24 |
}; |
| 25 |
|
| 26 |
class TextureAsset final : public CustomLoadableAsset<CustomTextureData> |
| 27 |
{ |
| 28 |
public: |
| 29 |
using CustomLoadableAsset::CustomLoadableAsset; |
| 30 |
|
| 31 |
private: |
| 32 |
CustomAssetLibrary::LoadInfo LoadImpl(const CustomAssetLibrary::AssetID& asset_id) override; |
| 33 |
}; |
| 34 |
|
| 35 |
class TextureAndSamplerAsset final : public CustomLoadableAsset<TextureAndSamplerData> |
| 36 |
{ |
| 37 |
public: |
| 38 |
using CustomLoadableAsset::CustomLoadableAsset; |
| 39 |
|
| 40 |
private: |
| 41 |
CustomAssetLibrary::LoadInfo LoadImpl(const CustomAssetLibrary::AssetID& asset_id) override; |
| 42 |
}; |
| 43 |
} |