protected void allocateBuffer()
{
if ( buffer.Data != IntPtr.Zero )
// Already allocated
return;
// Allocate storage
_data = new byte[ this.sizeInBytes ];
_bufferPinndedHandle = GCHandle.Alloc( _data, GCHandleType.Pinned );
buffer.Data = _bufferPinndedHandle.AddrOfPinnedObject();
// TODO: use PBO if we're HBU_DYNAMIC
}