mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-23 18:59:19 +00:00
VideoCommon: add TextureData structure that contains the raw texture data, a sampler, and the type of texture information
This commit is contained in:
parent
260bad74ea
commit
7c52a52440
2 changed files with 151 additions and 0 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue