summaryrefslogtreecommitdiff
path: root/NW4RTools/Enums.cs
diff options
context:
space:
mode:
Diffstat (limited to 'NW4RTools/Enums.cs')
-rw-r--r--NW4RTools/Enums.cs22
1 files changed, 22 insertions, 0 deletions
diff --git a/NW4RTools/Enums.cs b/NW4RTools/Enums.cs
index 0b3518b..a81da6c 100644
--- a/NW4RTools/Enums.cs
+++ b/NW4RTools/Enums.cs
@@ -25,4 +25,26 @@ namespace NW4RTools {
C14X2 = 0xA,
CMPR = 0xE
}
+
+
+ public enum TextureWrapType {
+ CLAMP,
+ REPEAT,
+ MIRROR
+ }
+
+ public static class TextureWrapTypeExtensionMethods {
+ public static Collada141.fx_sampler_wrap_common ToColladaSamplerWrap(this TextureWrapType t) {
+ if (t == TextureWrapType.CLAMP)
+ return Collada141.fx_sampler_wrap_common.CLAMP;
+
+ if (t == TextureWrapType.REPEAT)
+ return Collada141.fx_sampler_wrap_common.WRAP;
+
+ if (t == TextureWrapType.MIRROR)
+ return Collada141.fx_sampler_wrap_common.MIRROR;
+
+ return Collada141.fx_sampler_wrap_common.WRAP;
+ }
+ }
}