///<summary>
		///    Call this to associate a D3D volume with this pixel buffer
		///</summary>
		public void Bind( D3D.Device device, D3D.Volume volume, bool update )
		{
			this.device = device;
			this.volume = volume;

			D3D.VolumeDescription desc = volume.Description;
			Width = desc.Width;
			Height = desc.Height;
			Depth = desc.Depth;
			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 );
		}
		public D3DHardwarePixelBuffer( BufferUsage usage )
			: base( 0, 0, 0, Axiom.Media.PixelFormat.Unknown, usage, false, false )
		{
			device = null;
			surface = null;
			volume = null;
			tempSurface = null;
			tempVolume = null;
			doMipmapGen = false;
			HWMipmaps = false;
			mipTex = null;
			sliceTRT = new List<RenderTexture>();
		}