/// <summary> /// Allocate a new CPU buffer for this Buffer. /// </summary> /// <param name="size"> /// A <see cref="UInt32"/> that determine the size of the buffer object CPU buffer, in bytes. /// </param> protected void CreateCpuBuffer(uint size) { // Discard previous buffer DeleteCpuBuffer(); // Allocate memory, if required _CpuBuffer = new AlignedMemoryBuffer(size, DefaultBufferAlignment); _CpuBuffer.ResetBuffer(); }
/// <summary> /// Allocate a new client buffer for this BufferObject. /// </summary> /// <param name="size"> /// A <see cref="UInt32"/> that determine the size of the buffer object client buffer, in bytes. /// </param> protected virtual void AllocateClientBuffer(uint size) { // Discard previous buffer ReleaseClientBuffer(); // Allocate memory, if required _ClientBuffer = new AlignedMemoryBuffer(size, MinimumBufferAlignment); _ClientBuffer.ResetBuffer(); }