/// <summary> /// Initializes a new instance of the <see cref="MemoryBlock"/> struct. /// </summary> /// <param name="size">The size of the block, in bytes.</param> public MemoryBlock(int size) { ptr = NativeMethods.bgfx_alloc(size); }
/// <summary> /// Initializes a new instance of the <see cref="MemoryBlock"/> struct. /// </summary> /// <param name="data">A pointer to the initial data to copy into the new block.</param> /// <param name="size">The size of the block, in bytes.</param> public MemoryBlock(IntPtr data, int size) { ptr = NativeMethods.bgfx_copy(data, size); }
MemoryBlock(DataPtr *ptr) { this.ptr = ptr; }