Esempio n. 1
0
 /// <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);
 }
Esempio n. 2
0
 /// <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);
 }
Esempio n. 3
0
 MemoryBlock(DataPtr *ptr)
 {
     this.ptr = ptr;
 }