Grindstone Game Engine v0.2.0
An open source game engine and toolkit.
Loading...
Searching...
No Matches
Keyword.hpp
1#pragma once
2
3#include <string_view>
4#include <cstring>
5#include <map>
6
7#define KEYWORD_LIST \
8E(shaderHlsl)\
9E(shaderGlsl)\
10E(computeSet)\
11E(pipelineSet)\
12E(parameters)\
13E(name)\
14E(configuration)\
15E(pass)\
16E(shaderBlock)\
17E(requiresBlocks)\
18E(clones)\
19E(inherits)\
20E(stage)\
21E(renderQueue)\
22E(properties)\
23E(shaderEntrypoint)\
24E(rendererTags)\
25E(passTags)\
26E(attachments)\
27E(colorMask)\
28E(cull)\
29E(geometryType)\
30E(fillMode)\
31E(depthBias)\
32E(depthWrite)\
33E(depthTest)\
34E(depthClamp)\
35E(depthCompareOp)\
36E(blendPreset)\
37E(blendColor)\
38E(blendAlpha)\
39E(points)\
40E(lines)\
41E(lineStrips)\
42E(lineLoops)\
43E(triangleStrips)\
44E(triangleFans)\
45E(triangles)\
46E(linesAdjacency)\
47E(trianglesAdjacency)\
48E(triangleStripsAdjacency)\
49E(patches)\
50E(point)\
51E(line)\
52E(fill)\
53E(never)\
54E(less)\
55E(equal)\
56E(lessOrEqual)\
57E(greater)\
58E(notEqual)\
59E(greaterOrEqual)\
60E(always)\
61E(none)\
62E(front)\
63E(back)\
64E(both)\
65E(zero)\
66E(one)\
67E(srcColor)\
68E(oneMinusSrcColor)\
69E(dstColor)\
70E(oneMinusDstColor)\
71E(srcAlpha)\
72E(oneMinusSrcAlpha)\
73E(dstAlpha)\
74E(oneMinusDstAlpha)\
75E(constantColor)\
76E(oneMinusConstantColor)\
77E(constantAlpha)\
78E(oneMinusConstantAlpha)\
79E(srcAlphaSaturate)\
80E(src1Color)\
81E(oneMinusSrc1Color)\
82E(src1Alpha)\
83E(oneMinusSrc1Alpha)\
84E(off)\
85E(add)\
86E(subtract)\
87E(reverseSubtract)\
88E(minimum)\
89E(maximum)\
90E(source)\
91E(destination)\
92E(sourceOver)\
93E(destinationOver)\
94E(sourceIn)\
95E(destinationIn)\
96E(sourceOut)\
97E(destinationOut)\
98E(sourceAtop)\
99E(destinationAtop)\
100E(xOR)\
101E(multiply)\
102E(screen)\
103E(overlay)\
104E(darken)\
105E(lighten)\
106E(colorDodge)\
107E(colorBurn)\
108E(hardLight)\
109E(softLight)\
110E(difference)\
111E(exclusion)\
112E(invert)\
113E(invertRGB)\
114E(linearDodge)\
115E(linearBurn)\
116E(vividLight)\
117E(linearLight)\
118E(pinLight)\
119E(hardMix)\
120E(hSLHue)\
121E(hSLSaturation)\
122E(hSLColor)\
123E(hSLLuminosity)\
124E(plus)\
125E(plusClamped)\
126E(plusClampedAlpha)\
127E(plusDark)\
128E(minus)\
129E(minusClamped)\
130E(contrast)\
131E(invertOVG)\
132E(red)\
133E(green)\
134E(blue)\
135E(vertex)\
136E(tesselationEvaluation)\
137E(tesselationControl)\
138E(geometry)\
139E(fragment)\
140E(task)\
141E(mesh)\
142E(compute)\
143E(opaque)\
144E(translucent)\
145E(additive)\
146E(multiplicative)\
147E(premultiply)\
148E(Color)\
149E(Bool)\
150E(Int)\
151E(Int2)\
152E(Int3)\
153E(Int4)\
154E(Uint)\
155E(Uint2)\
156E(Uint3)\
157E(Uint4)\
158E(Float)\
159E(Float2)\
160E(Float3)\
161E(Float4)\
162E(Double)\
163E(Double2)\
164E(Double3)\
165E(Double4)\
166E(Matrix2x2)\
167E(Matrix2x3)\
168E(Matrix2x4)\
169E(Matrix3x2)\
170E(Matrix4x2)\
171E(Matrix3x3)\
172E(Matrix3x4)\
173E(Matrix4x3)\
174E(Matrix4x4)\
175E(Texture)\
176E(Sampler)\
177E(Image)\
178E(Atomic)
179
180enum class Keyword : uint8_t {
181#define E(val) val,
182 KEYWORD_LIST
183#undef E
184 includeKeyword,
185 abstractKeyword,
186 boolTrue,
187 boolFalse
188};
189
190constexpr const char* keywordStrings[] = {
191#define E(val) #val,
192 KEYWORD_LIST
193#undef E
194 "include",
195 "abstract",
196 "true",
197 "false"
198};
199
200extern std::map<std::string_view, Keyword> stringToKeywordMap;