public static TxpMipMap FromDds(DdsMipMap mip, DdsPixelFormat pf) { TxpMipMap tex = new TxpMipMap(); if (mip == null) { return(tex); } tex.width = mip.width; tex.height = mip.height; switch (new string(pf.compressionName)) { case "RGB ": tex.type = TexType.RGB; break; case "RGBA": tex.type = TexType.RGBA; break; case "DXT1": tex.type = TexType.DXT1; break; case "DXT3": tex.type = TexType.DXT3; break; case "DXT5": tex.type = TexType.DXT5; break; case "ATI2": tex.type = TexType.ATI2n; break; } tex.byteSize = mip.byteSize; tex.data = mip.data; return(tex); }
public DdsMipMapInfo(string name, int level, DdsMipMap mipMap) { Name = name; Level = level; MipMap = mipMap; }