Grindstone Game Engine v0.2.0
An open source game engine and toolkit.
Loading...
Searching...
No Matches
MaterialImporter.hpp
1#pragma once
2
3#include <filesystem>
4#include <string>
5#include <map>
6
7#include <rapidjson/document.h>
8
9#include <Common/Graphics/DescriptorSet.hpp>
10#include <EngineCore/Assets/AssetImporter.hpp>
11#include <EngineCore/Assets/Shaders/ShaderReflectionData.hpp>
12#include "MaterialAsset.hpp"
13
14namespace Grindstone {
15 namespace GraphicsAPI {
16 class Texture;
17 }
18
19 class BaseAssetRenderer;
20
21 class MaterialImporter : public SpecificAssetImporter<MaterialAsset, AssetType::Material> {
22 public:
24 virtual ~MaterialImporter() override;
25 virtual void QueueReloadAsset(Uuid uuid) override;
26 virtual void* ProcessLoadedFile(Uuid uuid) override;
27
28 private:
29 void SetupUniformBuffer(rapidjson::Document& document, ShaderReflectionData& reflectionData, std::vector<GraphicsAPI::DescriptorSet::Binding>& bindings, std::string name, MaterialAsset* materialAsset);
30 void SetupSamplers(rapidjson::Document& document, ShaderReflectionData& reflectionData, std::vector<GraphicsAPI::DescriptorSet::Binding>& bindings);
31
32 GraphicsAPI::Texture* missingTexture = nullptr;
33 };
34}
Definition Texture.hpp:40
Definition MaterialImporter.hpp:21
Definition AssetImporter.hpp:29
Definition Uuid.hpp:6
Definition MaterialAsset.hpp:16
Definition ShaderReflectionData.hpp:7