예제 #1
0
        public void NotCompressedInternalFormat()
        {
            var textureCubeMap = new SFGraphics.GLObjects.Textures.TextureCubeMap();

            var e = Assert.ThrowsException <ArgumentException>(() =>
                                                               textureCubeMap.LoadImageData(128, InternalFormat.Rgba,
                                                                                            mipmaps, mipmaps, mipmaps, mipmaps, mipmaps, mipmaps));
        }
예제 #2
0
        public void BitmapFaces()
        {
            // Will fail if exception is thrown.
            var texture = new SFGraphics.GLObjects.Textures.TextureCubeMap();

            texture.LoadImageData(new System.Drawing.Bitmap(8, 8 * 8 * 6), 8);

            Assert.AreEqual(8, texture.Width);
            Assert.AreEqual(8, texture.Height);
        }
예제 #3
0
        public void CorrectFormatSameMipmapCount()
        {
            // Will fail if exception is thrown.
            var texture = new SFGraphics.GLObjects.Textures.TextureCubeMap();

            texture.LoadImageData(128, InternalFormat.CompressedRgbaS3tcDxt1Ext,
                                  mipmaps, mipmaps, mipmaps, mipmaps, mipmaps, mipmaps);

            Assert.AreEqual(128, texture.Width);
            Assert.AreEqual(128, texture.Height);
        }
예제 #4
0
        public void InvalidMipmapCount()
        {
            List <byte[]> mipmapsBig = new List <byte[]>();

            mipmapsBig.Add(new byte[16]);

            var textureCubeMap = new SFGraphics.GLObjects.Textures.TextureCubeMap();

            var e = Assert.ThrowsException <ArgumentOutOfRangeException>(() =>
                                                                         textureCubeMap.LoadImageData(128, InternalFormat.CompressedRgbaS3tcDxt1Ext,
                                                                                                      mipmaps, mipmaps, mipmaps, mipmapsBig, mipmaps, mipmaps));
        }