protected override void DisposeNative() { nativeVertexBuffer.Dispose(); if (nativeIndexBuffer != null) { nativeIndexBuffer.Dispose(); } }
/// <summary> /// In a derived class, implements logic to resize the buffer. /// During resize, the existing buffer contents need not be preserved. /// </summary> /// <param name="sizeInBytes">The new size, in bytes.</param> protected override void ResizeBuffer(int sizeInBytes) { if (buffer != null) { buffer.Dispose(); } buffer = new D3D.VertexBuffer( device, sizeInBytes, D3D.Usage.Dynamic | D3D.Usage.WriteOnly, D3D.VertexFormat.None, D3D.Pool.Default ); }