-
Notifications
You must be signed in to change notification settings - Fork 0
/
EShLanguage.java
104 lines (98 loc) · 2.88 KB
/
EShLanguage.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
package com.destranix.glslang;
public enum EShLanguage {
EShLangVertex(Main.E_SH_LANG_VERTEX),
EShLangTessControl(Main.E_SH_LANG_TESS_CONTROL),
EShLangTessEvaluation(Main.E_SH_LANG_TESS_EVALUATION),
EShLangGeometry(Main.E_SH_LANG_GEOMETRY),
EShLangFragment(Main.E_SH_LANG_FRAGMENT),
EShLangCompute(Main.E_SH_LANG_COMPUTE),
EShLangRayGen(Main.E_SH_LANG_RAY_GEN),
EShLangIntersect(Main.E_SH_LANG_INTERSECT),
EShLangAnyHit(Main.E_SH_LANG_ANY_HIT),
EShLangClosestHit(Main.E_SH_LANG_CLOSEST_HIT),
EShLangMiss(Main.E_SH_LANG_MISS),
EShLangCallable(Main.E_SH_LANG_CALLABLE),
EShLangTaskNV(Main.E_SH_LANG_TASK_NV),
EShLangMeshNV(Main.E_SH_LANG_MESH_NV);
private final int value;
private EShLanguage(int value) {
this.value = value;
}
public int getConstant() {
return this.value;
}
public static EShLanguage valueByStr(String str) {
switch (str) {
case "EShLangVertex":
return EShLangVertex;
case "EShLangTessControl":
return EShLangTessControl;
case "EShLangTessEvaluation":
return EShLangTessEvaluation;
case "EShLangGeometry":
return EShLangGeometry;
case "EShLangFragment":
return EShLangFragment;
case "EShLangCompute":
return EShLangCompute;
case "EShLangRayGen":
case "EShLangRayGenNV":
return EShLangRayGen;
case "EShLangIntersect":
case "EShLangIntersectNV":
return EShLangIntersect;
case "EShLangAnyHit":
case "EShLangAnyHitNV":
return EShLangAnyHit;
case "EShLangClosestHit":
case "EShLangClosestHitNV":
return EShLangClosestHit;
case "EShLangMiss":
case "EShLangMissNV":
return EShLangMiss;
case "EShLangCallable":
case "EShLangCallableNV":
return EShLangCallable;
case "EShLangTaskNV":
return EShLangTaskNV;
case "EShLangMeshNV":
return EShLangMeshNV;
default:
throw new IllegalArgumentException("Cannot translate string into enum value!");
}
}
public static EShLanguage valueByConstant(int constant) {
switch (constant) {
case Main.E_SH_LANG_VERTEX:
return EShLangVertex;
case Main.E_SH_LANG_TESS_CONTROL:
return EShLangTessControl;
case Main.E_SH_LANG_TESS_EVALUATION:
return EShLangTessEvaluation;
case Main.E_SH_LANG_GEOMETRY:
return EShLangGeometry;
case Main.E_SH_LANG_FRAGMENT:
return EShLangFragment;
case Main.E_SH_LANG_COMPUTE:
return EShLangCompute;
case Main.E_SH_LANG_RAY_GEN:
return EShLangRayGen;
case Main.E_SH_LANG_INTERSECT:
return EShLangIntersect;
case Main.E_SH_LANG_ANY_HIT:
return EShLangAnyHit;
case Main.E_SH_LANG_CLOSEST_HIT:
return EShLangClosestHit;
case Main.E_SH_LANG_MISS:
return EShLangMiss;
case Main.E_SH_LANG_CALLABLE:
return EShLangCallable;
case Main.E_SH_LANG_TASK_NV:
return EShLangTaskNV;
case Main.E_SH_LANG_MESH_NV:
return EShLangMeshNV;
default:
throw new IllegalArgumentException("Cannot translate constant into enum value!");
}
}
}