-
Notifications
You must be signed in to change notification settings - Fork 0
/
EShTargetClientVersion.java
48 lines (42 loc) · 1.3 KB
/
EShTargetClientVersion.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 EShTargetClientVersion {
EShTargetVulkan_1_0(Main.E_SH_TARGET_VULKAN_1_0),
EShTargetVulkan_1_1(Main.E_SH_TARGET_VULKAN_1_1),
EShTargetVulkan_1_2(Main.E_SH_TARGET_VULKAN_1_2),
EShTargetOpenGL_450(Main.E_SH_TARGET_OPENGL_450);
private final int value;
private EShTargetClientVersion(int value) {
this.value = value;
}
public int getConstant() {
return this.value;
}
public static EShTargetClientVersion valueByStr(String str) {
switch (str) {
case "EShTargetVulkan_1_0":
return EShTargetVulkan_1_0;
case "EShTargetVulkan_1_1":
return EShTargetVulkan_1_1;
case "EShTargetVulkan_1_2":
return EShTargetVulkan_1_2;
case "EShTargetOpenGL_450":
return EShTargetOpenGL_450;
default:
throw new IllegalArgumentException("Cannot translate string into enum value!");
}
}
public static EShTargetClientVersion valueByConstant(int constant) {
switch (constant) {
case Main.E_SH_TARGET_VULKAN_1_0:
return EShTargetVulkan_1_0;
case Main.E_SH_TARGET_VULKAN_1_1:
return EShTargetVulkan_1_1;
case Main.E_SH_TARGET_VULKAN_1_2:
return EShTargetVulkan_1_2;
case Main.E_SH_TARGET_OPENGL_450:
return EShTargetOpenGL_450;
default:
throw new IllegalArgumentException("Cannot translate constant into enum value!");
}
}
}