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 );
}