mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-26 07:39:45 -06:00
VideoCommon: add TextureData structure that contains the raw texture data, a sampler, and the type of texture information
This commit is contained in:
@ -3,8 +3,11 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <picojson.h>
|
||||
|
||||
#include "VideoCommon/Assets/CustomAsset.h"
|
||||
#include "VideoCommon/Assets/CustomTextureData.h"
|
||||
#include "VideoCommon/RenderState.h"
|
||||
|
||||
namespace VideoCommon
|
||||
{
|
||||
@ -17,6 +20,21 @@ private:
|
||||
CustomAssetLibrary::LoadInfo LoadImpl(const CustomAssetLibrary::AssetID& asset_id) override;
|
||||
};
|
||||
|
||||
struct TextureData
|
||||
{
|
||||
static bool FromJson(const CustomAssetLibrary::AssetID& asset_id, const picojson::object& json,
|
||||
TextureData* data);
|
||||
enum class Type
|
||||
{
|
||||
Type_Undefined,
|
||||
Type_Texture2D,
|
||||
Type_Max = Type_Texture2D
|
||||
};
|
||||
Type m_type;
|
||||
CustomTextureData m_data;
|
||||
SamplerState m_sampler;
|
||||
};
|
||||
|
||||
class GameTextureAsset final : public CustomLoadableAsset<CustomTextureData>
|
||||
{
|
||||
public:
|
||||
|
Reference in New Issue
Block a user