Пример #1
0
        private void LoadImage(Texture.TextureTypes type)
        {
            Texture tx = textures.Find(x => x.Type == type);

            Tipp.Text      = string.Empty;
            Preview.Source = tx.GetImage();
            Dimension.Text = tx.Resolution;
            Size.Text      = tx.Size;
        }
Пример #2
0
        private void ExportImage(Texture.TextureTypes type)
        {
            Texture tx = textures.Find(x => x.Type == type);

            tx.ExportFile(((DirectoryInfo)TexturesList.SelectedItem).Name, "_");
        }
Пример #3
0
        public static ImageTexture FromGltf(this glTFTexture x, glTFTextureSampler sampler, List <Image> images, Texture.ColorSpaceTypes colorSpace, Texture.TextureTypes textureType)
        {
            var image = images[x.source];
            var name  = !string.IsNullOrEmpty(x.name) ? x.name : image.Name;

            return(new ImageTexture(x.name, sampler.FromGltf(), image, colorSpace, textureType));
        }