Grindstone Game Engine
v0.2.0
An open source game engine and toolkit.
Toggle main menu visibility
Loading...
Searching...
No Matches
PipelineSetConditioner.hpp
1
#pragma once
2
3
#include <filesystem>
4
#include <vector>
5
#include <set>
6
#include <map>
7
8
#include <Grindstone.Editor.PipelineSetImporter/include/PipelineSet/Converter/CompilationOptions.hpp>
9
#include <Grindstone.Editor.PipelineSetImporter/include/PipelineSet/WriteCallback.hpp>
10
#include <Grindstone.Editor.PipelineSetImporter/include/PipelineSet/Log.hpp>
11
12
class
PipelineSetConditioner {
13
public
:
14
PipelineSetConditioner(WriteCallback writeFn =
nullptr
, LogCallback logFn =
nullptr
, ResolvePathCallback resolvePathFn =
nullptr
);
15
void
Add(
const
std::filesystem::path& path);
16
void
Scan(
const
std::filesystem::path& path);
17
void
Convert(
CompilationOptions
options);
18
void
Rerun(
const
std::filesystem::path& path);
19
LogCallback GetLogCallback()
const
;
20
21
private
:
22
std::set<std::filesystem::path> unprocessedFiles;
23
24
struct
ShaderBlock {
25
std::filesystem::path srcPath;
26
std::string code;
27
};
28
29
std::map<std::string, ShaderBlock> shaderBlocks;
30
31
struct
PipelineTemplate {
32
std::filesystem::path srcPath;
33
std::vector<std::filesystem::path> requiredBlocks;
34
};
35
36
std::map<std::string, PipelineTemplate> pipelineTemplates;
37
38
ResolvePathCallback resolvePathCallback =
nullptr
;
39
WriteCallback writeFileCallback =
nullptr
;
40
LogCallback logCallback =
nullptr
;
41
};
CompilationOptions
Definition
CompilationOptions.hpp:3
plugins
Grindstone.Editor.PipelineSetImporter
include
PipelineSet
Converter
PipelineSetConditioner.hpp
Generated by
1.17.0