示例#1
0
		public void MipMapsHaveCorrectDimensions(int mipLevel, int expectedWidth)
		{
			// Arrange.
			var texture = new Texture1D(new Device(), new Texture1DDescription
			{
				Width = 64,
				ArraySize = 1
			});

			// Act / Assert.
			int actualWidth;
			texture.GetDimensions(mipLevel, out actualWidth);
			Assert.That(actualWidth, Is.EqualTo(expectedWidth));
		}
示例#2
0
		public void TextureHasCorrectNumberOfMipMapLevels()
		{
			// Arrange.
			var texture = new Texture1D(new Device(), new Texture1DDescription
			{
				Width = 32,
				ArraySize = 1
			});
			int width, numberOfLevels;

			// Act.
			texture.GetDimensions(0, out width, out numberOfLevels);

			// Assert.
			Assert.That(width, Is.EqualTo(32));
			Assert.That(numberOfLevels, Is.EqualTo(6));
		}