Files
parkan-playground/TexmLib/Extensions.cs
T

20 lines
431 B
C#
Raw Permalink Normal View History

2024-11-18 23:48:42 +03:00
namespace TexmLib;
2024-11-14 12:04:05 +03:00
public static class Extensions
{
public static int AsStride(this int format)
{
return format switch
{
2026-05-09 20:36:43 +03:00
0x0 => 8,
2025-11-27 19:01:41 +03:00
0x235 => 16,
2026-05-09 20:36:43 +03:00
0x22C => 16,
0x115C => 16,
0x58 => 16,
2025-11-27 19:01:41 +03:00
0x378 => 32,
2026-05-09 20:36:43 +03:00
0x22B8 => 32,
_ => throw new InvalidOperationException($"Unsupported Texm format {format}")
2024-11-14 12:04:05 +03:00
};
}
2026-05-09 20:36:43 +03:00
}