Example #1
0
        public void ExportTest(string file)
        {
            TexImage image = TestTools.Load(library, file);

            TexLibraryTest.ExportTest(image, library, file);

            image.Dispose();
        }
Example #2
0
        public void ExportTestMinMipmap(string file, int minMipMapSize)
        {
            TexImage image = TestTools.Load(library, file);

            TexLibraryTest.ExportMinMipMapTest(image, library, minMipMapSize);

            image.Dispose();
        }
Example #3
0
        public void FlipTest(string file, Orientation orientation)
        {
            TexImage image = TestTools.Load(library, file);

            TexLibraryTest.FlipTest(image, library, orientation);

            image.Dispose();
        }
Example #4
0
        public void FixedRescaleTest(string file, Filter.Rescaling filter)
        {
            TexImage image = TestTools.Load(library, file);

            TexLibraryTest.FixedRescaleTest(image, library, filter);

            image.Dispose();
        }
Example #5
0
        public void SwitchChannelsTest(string file)
        {
            TexImage image = TestTools.Load(library, file);

            TexLibraryTest.SwitchChannelsTest(image, library);

            image.Dispose();
        }
Example #6
0
        public void CorrectGammaTest(string file)
        {
            TexImage image = TestTools.Load(library, file);

            TexLibraryTest.CorrectGammaTest(image, library);

            image.Dispose();
        }
Example #7
0
        public void GenerateNormalMapTest(string file, string outFile)
        {
            TexImage image = TestTools.Load(library, file);

            TexLibraryTest.GenerateNormalMapTest(image, library);

            image.Dispose();
        }
Example #8
0
        public void GenerateMipMapTest(string file, Filter.MipMapGeneration filter)
        {
            TexImage image = TestTools.Load(library, file);

            TexLibraryTest.GenerateMipMapTest(image, library, filter);

            image.Dispose();
        }
Example #9
0
        public void CompressTest(string file, Stride.Graphics.PixelFormat format)
        {
            TexImage image = TestTools.Load(library, file);

            TexLibraryTest.CompressTest(image, library, format);

            image.Dispose();
        }
Example #10
0
        public void DecompressTest(string file)
        {
            TexImage image = TestTools.Load(library, file);

            TexLibraryTest.DecompressTest(image, library);

            image.Dispose();
        }
Example #11
0
        public void PreMultiplyAlphaTest(String file)
        {
            TexImage image = TestTools.Load(library, file);

            TexLibraryTest.PreMultiplyAlphaTest(image, library);

            image.Dispose();
        }
Example #12
0
        public void StartLibraryTest(string file)
        {
            TexImage image = new TexImage();

            var dxtLib = new DxtTexLib();

            dxtLib.Execute(image, new LoadingRequest(Module.PathToInputImages + file, false));
            image.CurrentLibrary = dxtLib;
            dxtLib.EndLibrary(image);

            TexLibraryTest.StartLibraryTest(image, library);

            image.Dispose();
        }
Example #13
0
        public void FixedRescale3DTest()
        {
            DxtTexLib lib   = new DxtTexLib();
            TexImage  image = new TexImage();

            lib.Execute(image, new LoadingRequest(Module.PathToInputImages + "Texture3D_WMipMaps_BGRA8888.dds", false));
            image.Name = "Texture3D_WMipMaps_BGRA8888.dds";
            lib.EndLibrary(image);
            library.StartLibrary(image);
            image.CurrentLibrary = library;
            TexLibraryTest.FactorRescaleTest(image, library, Filter.Rescaling.Lanczos3);

            image.Dispose();
        }
Example #14
0
        public void StartLibraryTest(string file)
        {
            TexImage image = TestTools.Load(library, file);

            TexLibraryTest.StartLibraryTest(image, library);

            DxtTextureLibraryData libraryData = (DxtTextureLibraryData)image.LibraryData[library];

            Assert.True(libraryData.DxtImages.Length == image.SubImageArray.Length);
            for (int i = 0; i < libraryData.DxtImages.Length; ++i) // Checking on features
            {
                Assert.True(libraryData.DxtImages[i].RowPitch == image.SubImageArray[i].RowPitch);
            }

            image.CurrentLibrary = null; // If we don't set the CurrentLibrary to null, the Dispose() method of TexImage will try calling the EndMethod, which won't work if no operation has been made on the image since the StartLibrary call. This case can't happen.

            image.Dispose();
        }