예제 #1
0
 /// <summary>
 /// Disposes all GPU resources currently cached.
 /// It's an error to push any GPU commands after disposal.
 /// Additionally, the GPU commands FIFO must be empty for disposal,
 /// and processing of all commands must have finished.
 /// </summary>
 public void Dispose()
 {
     Methods.ShaderCache.Dispose();
     Methods.BufferManager.Dispose();
     Methods.TextureManager.Dispose();
     Renderer.Dispose();
     GPFifo.Dispose();
 }
예제 #2
0
 /// <summary>
 /// Disposes all GPU resources currently cached.
 /// It's an error to push any GPU commands after disposal.
 /// Additionally, the GPU commands FIFO must be empty for disposal,
 /// and processing of all commands must have finished.
 /// </summary>
 public void Dispose()
 {
     Methods.ShaderCache.Dispose();
     Methods.BufferManager.Dispose();
     Methods.TextureManager.Dispose();
     Renderer.Dispose();
     GPFifo.Dispose();
     HostInitalized.Dispose();
     ReadyEvent.Dispose();
 }
예제 #3
0
        /// <summary>
        /// Disposes all GPU resources currently cached.
        /// It's an error to push any GPU commands after disposal.
        /// Additionally, the GPU commands FIFO must be empty for disposal,
        /// and processing of all commands must have finished.
        /// </summary>
        public void Dispose()
        {
            Renderer.Dispose();
            GPFifo.Dispose();
            HostInitalized.Dispose();

            // Has to be disposed before processing deferred actions, as it will produce some.
            foreach (var physicalMemory in PhysicalMemoryRegistry.Values)
            {
                physicalMemory.Dispose();
            }

            PhysicalMemoryRegistry.Clear();

            RunDeferredActions();
        }