Пример #1
0
 //[overrideFuctions]
 protected override void Dispose(bool disposing)
 {
     foreach (var resource in _resources)
     {
         CUDAInterop.cuSafeCall(CUDAInterop.cuGraphicsUnregisterResource(resource));
     }
     foreach (var buffer in _buffers)
     {
         CUDAInterop.cuSafeCall(CUDAInterop.cuGLUnregisterBufferObject(buffer));
     }
     if (_buffers.Length > 0)
     {
         GL.DeleteBuffers(_buffers.Length, _buffers);
     }
     if (disposing)
     {
         _vel.Dispose();
         _disposeSimulators();
         _worker.Dispose();
     }
     base.Dispose(disposing);
 }
Пример #2
0
 static void UnregisterVerticesResource(IntPtr res)
 {
     CUDAInterop.cuSafeCall(CUDAInterop.cuGraphicsUnregisterResource(res));
 }