Ejemplo n.º 1
0
 public void Dispose()
 {
     if (Buffer != null)
     {
         GpuBackend.ReleaseBuffer(Buffer);
         Buffer = null;
     }
 }
Ejemplo n.º 2
0
 void Dispose(bool disposing)
 {
     if (disposing && Buffer != null)
     {
         GpuBackend.ReleaseBuffer(Buffer);
         Buffer = null;
     }
 }
Ejemplo n.º 3
0
        public void Reset(Shape shape)
        {
            Shape = shape;

            var total = shape.ElementCount;

            if (Buffer != null && total != Buffer.count)
            {
                GpuBackend.ReleaseBuffer(Buffer);
                Buffer = null;
            }

            if (Buffer == null && total > 0)
            {
                Buffer = GpuBackend.AllocateBuffer(total);
            }
        }