1
0
mirror of synced 2024-12-02 19:17:24 +01:00
Switch-Toolbox/Switch_FileFormatsMain/GUI/TextureUI/Importers/CreateGx2Texture.cs
KillzXGaming ae25f2989b Some more fixes.
Revert the GX2 one more time since swizzling is a bit bugged, but add a more up to date code as a backup.
Fix the swizzle pattern settings
2019-04-17 14:59:08 -04:00

30 lines
820 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Switch_Toolbox.Library;
using Syroot.NintenTools.Bfres.GX2;
namespace FirstPlugin
{
public class GTXSwizzle
{
public static GX2.GX2Surface CreateGx2Texture(byte[] imageData, GTXImporterSettings setting)
{
return GX2.CreateGx2Texture(imageData,
setting.TexName,
setting.tileMode,
(uint)setting.AAMode,
setting.TexWidth,
setting.TexHeight,
setting.Depth,
(uint)setting.Format,
setting.SwizzlePattern,
setting.MipSwizzle,
(uint)setting.SurfaceDim,
setting.MipCount);
}
}
}