Axiom.RenderSystems.Xna.XnaHardwarePixelBuffer.Bind C# (CSharp) Method

Bind() public method

public Bind ( Microsoft.Xna.Framework.Graphics device, Microsoft.Xna.Framework.Graphics surface, bool update ) : void
device Microsoft.Xna.Framework.Graphics
surface Microsoft.Xna.Framework.Graphics
update bool
return void
		public void Bind( XFG.GraphicsDevice device, XFG.RenderTarget2D surface, bool update )
		{
			this.device = device;
			this.renderTarget = (XFG.RenderTarget2D)surface;

			Width = surface.Width / (int)Axiom.Math.Utility.Pow( 2, mipLevel );
			Height = surface.Height / (int)Axiom.Math.Utility.Pow( 2, mipLevel );
			Depth = 1;
			Format = XnaHelper.Convert( surface.Format );
			// Default
			RowPitch = Width;
			SlicePitch = Height * Width;
			sizeInBytes = PixelUtil.GetMemorySize( Width, Height, Depth, Format );

			if ( ( (int)usage & (int)TextureUsage.RenderTarget ) != 0 )
				CreateRenderTextures( update );
		}

Same methods

XnaHardwarePixelBuffer::Bind ( Microsoft.Xna.Framework.Graphics device, Microsoft.Xna.Framework.Graphics surface, ushort miplevel, bool update ) : void