legatt 389ed599c8 Pipeline factory and materials
- AssetManager uses static assets ID from path hash
- PipelineFactory creates Vulkan pipelines using PipelineConfig structure depending on AssetMaterial and creation flags
- AssetMaterial describes pipelines (e.g. used shaders)
- Materials are described with JSON in sources with path references to other assets
- AssetMaterial is parsed from binary file with asset IDs in references
- compile_config tool compiles material JSON file to binary file with path references replaced with asset IDs
- Allocator supports type's constructors with arguments
- NativeFileSystem: fixed empty bufferSize and buffer trash
2025-08-29 13:13:11 +03:00

30 lines
583 B
C++

#pragma once
#include <concepts>
#include <cstdint>
struct AssetData {};
template<typename T> concept Asset = std::derived_from<T, AssetData>;
struct AssetBinary : AssetData
{
uint8_t* content = nullptr;
size_t size = 0;
AssetBinary(uint8_t* &source, const size_t &sourceSize);
~AssetBinary();
};
struct AssetShader : AssetData
{
uint32_t* content = nullptr;
size_t size = 0;
AssetShader(uint8_t* &source, const size_t &sourceSize);
~AssetShader();
};
struct AssetMaterial : AssetData
{
uint32_t vertexShader;
uint32_t fragmentShader;
};