-
Notifications
You must be signed in to change notification settings - Fork 0
/
EShTextureSamplerTransformMode.java
38 lines (32 loc) · 1.13 KB
/
EShTextureSamplerTransformMode.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
package com.destranix.glslang;
public enum EShTextureSamplerTransformMode {
EShTexSampTransKeep(Main.E_SH_TES_SAMP_TRANS_KEEP),
EShTexSampTransUpgradeTextureRemoveSampler(Main.E_SH_TEX_SAMP_TRANS_UPGRADE_TEXTURE_REMOVE_SAMPLER);
private final int value;
private EShTextureSamplerTransformMode(int value) {
this.value = value;
}
public int getConstant() {
return this.value;
}
public static EShTextureSamplerTransformMode valueByStr(String str) {
switch (str) {
case "EShTexSampTransKeep":
return EShTexSampTransKeep;
case "EShTexSampTransUpgradeTextureRemoveSampler":
return EShTexSampTransUpgradeTextureRemoveSampler;
default:
throw new IllegalArgumentException("Cannot translate string into enum value!");
}
}
public static EShTextureSamplerTransformMode valueByConstant(int constant) {
switch (constant) {
case Main.E_SH_TES_SAMP_TRANS_KEEP:
return EShTexSampTransKeep;
case Main.E_SH_TEX_SAMP_TRANS_UPGRADE_TEXTURE_REMOVE_SAMPLER:
return EShTexSampTransUpgradeTextureRemoveSampler;
default:
throw new IllegalArgumentException("Cannot translate constant into enum value!");
}
}
}