コード例 #1
0
ファイル: XenkoTexLibraryTest.cs プロジェクト: vol16bit/xenko
        public void StartLibraryTest(string file)
        {
            TexImage image = TestTools.Load(library, file);

            TexLibraryTest.StartLibraryTest(image, library);

            image.Dispose();
        }
コード例 #2
0
ファイル: AtitcTexLibraryTest.cs プロジェクト: rohitshe/Code
        public void StartLibraryTest(string file)
        {
            TexImage image = LoadInput(file);

            TexLibraryTest.StartLibraryTest(image, library);

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

            Assert.IsTrue(libraryData.Textures.Length == image.SubImageArray.Length);

            image.Dispose();
        }
コード例 #3
0
ファイル: PvrttTexLibTest.cs プロジェクト: rock6tsai/paradox
        public void StartLibraryTest(string file)
        {
            TexImage image = new TexImage();

            var dxtLib = new DxtTexLib();

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

            TexLibraryTest.StartLibraryTest(image, library);

            image.Dispose();
        }
コード例 #4
0
ファイル: DxtTexLibTest.cs プロジェクト: vol16bit/xenko
        public void StartLibraryTest(string file)
        {
            TexImage image = TestTools.Load(library, file);

            TexLibraryTest.StartLibraryTest(image, library);

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

            Assert.IsTrue(libraryData.DxtImages.Length == image.SubImageArray.Length);
            for (int i = 0; i < libraryData.DxtImages.Length; ++i) // Checking on features
            {
                Assert.IsTrue(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();
        }