Example #1
0
 public void UpdateGPUInstanceBuffer()
 {
     InstanceBuffer.SetDynamicData(InstanceBuffer.GraphicsDevice,
                                   (ptr) =>
     {
         System.Runtime.InteropServices.Marshal.Copy(InstanceDataRAM.ToArray(), 0,
                                                     ptr, InstanceDataRAM.Count);
     }, 0, SetDataOptions.Discard);
 }