Esempio n. 1
0
        public static MipmapFormat GetFormatForTex(Tex tex)
        {
            if (tex.MipmapsContainer.ImageFormat != FreeImageFormat.FIF_UNKNOWN)
            {
                return(FreeImageFormatToMipmapFormat(tex.MipmapsContainer.ImageFormat));
            }

            switch (tex.Header.Format)
            {
            case TexFormat.RGBA8888:
                return(MipmapFormat.RGBA8888);

            case TexFormat.DXT5:
                return(MipmapFormat.CompressedDXT5);

            case TexFormat.DXT3:
                return(MipmapFormat.CompressedDXT3);

            case TexFormat.DXT1:
                return(MipmapFormat.CompressedDXT1);

            case TexFormat.R8:
                return(MipmapFormat.R8);

            case TexFormat.RG88:
                return(MipmapFormat.RG88);

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
Esempio n. 2
0
 public static MipmapFormat GetFormatForTex(Tex tex)
 {
     return(GetFormatForTex(tex.ImagesContainer.ImageFormat, tex.Header.Format));
 }