Axiom.RenderSystems.DirectX9.D3DHardwarePixelBuffer.Bind C# (CSharp) Метод

Bind() публичный Метод

Call this to associate a D3D surface with this pixel buffer
public Bind ( SlimDX.Direct3D9 device, SlimDX.Direct3D9 surface, bool update ) : void
device SlimDX.Direct3D9
surface SlimDX.Direct3D9
update bool
Результат void
		public void Bind( D3D.Device device, D3D.Surface surface, bool update )
		{
			this.device = device;
			this.surface = surface;

			D3D.SurfaceDescription desc = surface.Description;
			Width = desc.Width;
			Height = desc.Height;
			Depth = 1;
			Format = D3DHelper.ConvertEnum( desc.Format );
			// Default
			RowPitch = Width;
			SlicePitch = Height * Width;
			sizeInBytes = PixelUtil.GetMemorySize( Width, Height, Depth, Format );

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