Grindstone Game Engine v0.2.0
An open source game engine and toolkit.
Loading...
Searching...
No Matches
ShaderReflectionData.hpp
1#pragma once
2
3#include <string>
4#include <vector>
5
6namespace Grindstone {
8 struct StructData {
9 struct MemberData {
10 std::string name;
11 std::string baseType;
12 size_t offset = 0;
13 size_t memberSize = 0;
14
15 MemberData() = default;
17 std::string name,
18 std::string baseType,
19 size_t offset,
20 size_t memberSize
21 ) : name(name),
22 baseType(baseType),
23 offset(offset),
24 memberSize(memberSize) {}
25 };
26 std::string name;
27 uint32_t bindingId = 0;
28 uint32_t setId = 0;
29 uint32_t bufferSize = 0;
30 uint8_t shaderStagesBitMask = 0;
31 std::vector<MemberData> members;
32
33 StructData() = default;
35 std::string name,
36 uint32_t bindingId,
37 uint32_t setId,
38 uint32_t bufferSize,
39 uint8_t shaderStagesBitMask
40 ) : name(name),
41 bindingId(bindingId),
42 setId(setId),
43 bufferSize(bufferSize),
44 shaderStagesBitMask(shaderStagesBitMask) {}
45 };
46
47 struct TextureData {
48 std::string name;
49 uint32_t bindingId = 0;
50 uint32_t setId = 0;
51 uint8_t shaderStagesBitMask = 0;
52
53 TextureData() = default;
55 std::string name,
56 uint32_t bindingId,
57 uint32_t setId,
58 uint8_t shaderStagesBitMask
59 ) : name(name),
60 bindingId(bindingId),
61 setId(setId),
62 shaderStagesBitMask(shaderStagesBitMask) {}
63 };
64
65 std::string name;
66 std::string renderQueue;
67 std::string geometryRenderer;
68 std::string transparencyMode;
69 std::string cullMode;
70 uint8_t shaderStagesBitMask = 0;
71 size_t numShaderStages = 0;
72 ShaderReflectionData() = default;
74 std::string name,
75 uint8_t shaderStagesBitMask,
76 size_t numShaderStages
77 ) : name(name),
78 shaderStagesBitMask(shaderStagesBitMask),
79 numShaderStages(numShaderStages) {}
80
81 std::vector<StructData> uniformBuffers;
82 std::vector<TextureData> textures;
83 };
84}
Definition ShaderReflectionData.hpp:8
Definition ShaderReflectionData.hpp:47
Definition ShaderReflectionData.hpp:7