コード例 #1
0
        private bool isMatch(TextureInfo texInfo)
        {
            switch (_mode)
            {
            case TextureViewerMode.ReadWrite:
                return(ReadWriteEnable == texInfo.ReadWriteEnable);

            case TextureViewerMode.MipMap:
                return(MipmapEnable == texInfo.MipmapEnable);

            case TextureViewerMode.Type:
                return(ImportType == texInfo.ImportType);

            case TextureViewerMode.Resolution:
                return(SizeIndex == ViewerConst.GetTextureSizeIndex(texInfo.Width, texInfo.Height));

            case TextureViewerMode.WidthVSHeight:
                return(WidthAndHeight == (texInfo.Width == texInfo.Height));

            case TextureViewerMode.StandaloneFormat:
                return(StandaloneFormat == texInfo.StandaloneFormat);

            case TextureViewerMode.AndroidFormat:
                return(AndroidFormat == texInfo.AndroidFormat);

            case TextureViewerMode.iOSFormat:
                return(IosFormat == texInfo.IosFormat);

            case TextureViewerMode.FilterMode:
                return(FilterMode == texInfo.FilterMode);
            }
            return(false);
        }
コード例 #2
0
 public TextureViewerData(string mode, TextureInfo texInfo)
 {
     _mode            = (TextureViewerMode)Enum.Parse(typeof(TextureViewerMode), mode);
     ReadWriteEnable  = texInfo.ReadWriteEnable;
     MipmapEnable     = texInfo.MipmapEnable;
     ImportType       = texInfo.ImportType;
     StandaloneFormat = texInfo.StandaloneFormat;
     AndroidFormat    = texInfo.AndroidFormat;
     IosFormat        = texInfo.IosFormat;
     WidthAndHeight   = texInfo.Width == texInfo.Height;
     SizeIndex        = ViewerConst.GetTextureSizeIndex(texInfo.Width, texInfo.Height);
     SizeStr          = ViewerConst.TextureSizeStr[SizeIndex];
     Width            = texInfo.Width;
     Height           = texInfo.Height;
     FilterMode       = texInfo.FilterMode;
 }