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)); }
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); }
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); }
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)); }