示例#1
0
 public void Dispose()
 {
     imageAvailableSemaphore.Dispose();
     renderFinishedSemaphore.Dispose();
     indexBufferMemory.Dispose();
     indexBuffer.Dispose();
     vertexBufferMemory.Dispose();
     vertexBuffer.Dispose();
     commandPool.Dispose();
     foreach (var fb in swapchainFramebuffers)
     {
         fb.Dispose();
     }
     pipeline.Dispose();
     pipelineLayout.Dispose();
     renderPass.Dispose();
     foreach (var iv in swapchainImageViews)
     {
         iv.Dispose();
     }
     swapchain.Dispose();
     device.Dispose();
     surface.Dispose();
     debugCallbacks.Dispose();
     instance.Dispose();
     GLFW.DestroyWindow(window);
     GLFW.Terminate();
 }
示例#2
0
 public void Dispose()
 {
     generator.Dispose();
     imageAvailableSemaphore.Dispose();
     renderFinishedSemaphore.Dispose();
     descriptorPool.Dispose();
     uniformBuffer.Dispose();
     uniformBufferMemory.Dispose();
     indexBuffer.Dispose();
     indexBufferMemory.Dispose();
     vertexBuffer.Dispose();
     vertexBufferMemory.Dispose();
     textureSampler.Dispose();
     textureImageView.Dispose();
     textureImage.Dispose();
     textureImageMemory.Dispose();
     stagingBuffer.Dispose();
     stagingBufferMemory.Dispose();
     commandPool.Dispose();
     foreach (var fb in swapchainFramebuffers)
     {
         fb.Dispose();
     }
     pipeline.Dispose();
     pipelineLayout.Dispose();
     descriptorSetLayout.Dispose();
     renderPass.Dispose();
     foreach (var iv in swapchainImageViews)
     {
         iv.Dispose();
     }
     swapchain.Dispose();
     device.Dispose();
     surface.Dispose();
     instance.Dispose();
     window.Dispose();
     GLFW.Terminate();
 }