Axiom.RenderSystems.Xna.XnaTexture.SetFinalAttributes C# (CSharp) Method

SetFinalAttributes() private method

private SetFinalAttributes ( int width, int height, int depth, PixelFormat format ) : void
width int
height int
depth int
format PixelFormat
return void
		private void SetFinalAttributes( int width, int height, int depth, PixelFormat format )
		{
			// set target texture attributes
			this.Height = height;
			this.Width = width;
			this.Depth = depth;
			this.Format = format;

			// Update size (the final size, not including temp space)
			// this is needed in Resource class
			int bytesPerPixel = this.Bpp >> 3;
			if ( !HasAlpha && this.Bpp == 32 )
			{
				bytesPerPixel--;
			}

			Size = width * height * depth * bytesPerPixel * ( ( TextureType == TextureType.CubeMap ) ? 6 : 1 );
			this.CreateSurfaceList();
		}