-
Notifications
You must be signed in to change notification settings - Fork 0
/
GcnShaderAMD.java
48 lines (42 loc) · 1.13 KB
/
GcnShaderAMD.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
package com.destranix.glslang;
public enum GcnShaderAMD {
GcnShaderBadAMD(Main.GCN_SHADER_BAD_AMD),
CubeFaceIndexAMD(Main.CUBE_FACE_INDEX_AMD),
CubeFaceCoordAMD(Main.CUBE_FACE_COORD_AMD),
TimeAMD(Main.TIME_AMD);
private final int value;
private GcnShaderAMD(int value) {
this.value = value;
}
public int getConstant() {
return this.value;
}
public static GcnShaderAMD valueByStr(String str) {
switch (str) {
case "GcnShaderBadAMD":
return GcnShaderBadAMD;
case "CubeFaceIndexAMD":
return CubeFaceIndexAMD;
case "CubeFaceCoordAMD":
return CubeFaceCoordAMD;
case "TimeAMD":
return TimeAMD;
default:
throw new IllegalArgumentException("Cannot translate string into enum value!");
}
}
public static GcnShaderAMD valueByConstant(int constant) {
switch (constant) {
case Main.GCN_SHADER_BAD_AMD:
return GcnShaderBadAMD;
case Main.CUBE_FACE_INDEX_AMD:
return CubeFaceIndexAMD;
case Main.CUBE_FACE_COORD_AMD:
return CubeFaceCoordAMD;
case Main.TIME_AMD:
return TimeAMD;
default:
throw new IllegalArgumentException("Cannot translate constant into enum value!");
}
}
}