예제 #1
0
        public void Dispose()
        {
            // Clean up used Vulkan resources 
            // Note : Inherited destructor cleans up resources stored in base class

            // Clean up texture resources
            vkDestroyImageView(device, cubeMap.view, null);
            vkDestroyImage(device, cubeMap.image, null);
            vkDestroySampler(device, cubeMap.sampler, null);
            vkFreeMemory(device, cubeMap.deviceMemory, null);

            vkDestroyPipeline(device, pipelines_skybox, null);
            vkDestroyPipeline(device, pipelines_reflect, null);

            vkDestroyPipelineLayout(device, pipelineLayout, null);
            vkDestroyDescriptorSetLayout(device, descriptorSetLayout, null);

            foreach (var model in models_objects)
            {
                model.destroy();
            }
            models_skybox.destroy();

            uniformBuffers_object.destroy();
            uniformBuffers_skybox.destroy();
        }
        public void Dispose()
        {
            vkDestroyPipeline(device, pipelines_phong, null);
            vkDestroyPipeline(device, pipelines_textured, null);
            vkDestroyPipeline(device, pipelines_toon, null);

            vkDestroyPipelineLayout(device, pipelineLayout, null);
            vkDestroyDescriptorSetLayout(device, descriptorSetLayout, null);

            models_cube.destroy();
            textures_colormap.destroy();
            uniformBuffer.destroy();
        }
예제 #3
0
        public void Dispose()
        {
            // Clean up used Vulkan resources
            // Note : Inherited destructor cleans up resources stored in base class
            vkDestroyPipeline(device, pipelines_solid, null);

            vkDestroyPipelineLayout(device, pipelineLayout, null);
            vkDestroyDescriptorSetLayout(device, descriptorSetLayout, null);

            models_scene.destroy();

            uniformBuffer.destroy();
        }
예제 #4
0
        public void Dispose()
        {
            // Clean up used Vulkan resources 
            // Note : Inherited destructor cleans up resources stored in base class

            // Textures
            textures_colorMap.destroy();

            // Frame buffer

            // Color attachment
            vkDestroyImageView(device, offscreenPass.color.view, null);
            vkDestroyImage(device, offscreenPass.color.image, null);
            vkFreeMemory(device, offscreenPass.color.mem, null);

            // Depth attachment
            vkDestroyImageView(device, offscreenPass.depth.view, null);
            vkDestroyImage(device, offscreenPass.depth.image, null);
            vkFreeMemory(device, offscreenPass.depth.mem, null);

            vkDestroyRenderPass(device, offscreenPass.renderPass, null);
            vkDestroySampler(device, offscreenPass.sampler, null);
            vkDestroyFramebuffer(device, offscreenPass.frameBuffer, null);

            vkDestroyPipeline(device, pipelines_debug, null);
            vkDestroyPipeline(device, pipelines_shaded, null);
            vkDestroyPipeline(device, pipelines_shadedOffscreen, null);
            vkDestroyPipeline(device, pipelines_mirror, null);

            vkDestroyPipelineLayout(device, pipelineLayouts_textured, null);
            vkDestroyPipelineLayout(device, pipelineLayouts_shaded, null);

            vkDestroyDescriptorSetLayout(device, descriptorSetLayouts_shaded, null);
            vkDestroyDescriptorSetLayout(device, descriptorSetLayouts_textured, null);

            // Models
            models_example.destroy();
            models_quad.destroy();
            models_plane.destroy();

            // Uniform buffers
            uniformBuffers_vsShared.destroy();
            uniformBuffers_vsMirror.destroy();
            uniformBuffers_vsOffScreen.destroy();
            uniformBuffers_vsDebugQuad.destroy();

            vkFreeCommandBuffers(device, cmdPool, 1, ref offscreenPass.commandBuffer);
            vkDestroySemaphore(device, offscreenPass.semaphore, null);
        }
예제 #5
0
        // C++ destructor
        public void Dispose()
        {
            // Clean up used Vulkan resources
            // Note : Inherited destructor cleans up resources stored in base class
            vkDestroyPipeline(Device, pipelines_phong, null);
            if (DeviceFeatures.fillModeNonSolid != 0)
            {
                vkDestroyPipeline(Device, pipelines_wireframe, null);
            }
            vkDestroyPipeline(Device, pipelines_toon, null);

            vkDestroyPipelineLayout(Device, pipelineLayout, null);
            vkDestroyDescriptorSetLayout(Device, descriptorSetLayout[0], null);

            models_cube.destroy();
            uniformBuffer.destroy();
        }
예제 #6
0
        public void Dispose()
        {
            // Clean up used Vulkan resources
            // Note : Inherited destructor cleans up resources stored in base class

            // Frame buffer

            // Color attachment
            vkDestroyImageView(device, offscreenPass.color.view, null);
            vkDestroyImage(device, offscreenPass.color.image, null);
            vkFreeMemory(device, offscreenPass.color.mem, null);

            // Depth attachment
            vkDestroyImageView(device, offscreenPass.depth.view, null);
            vkDestroyImage(device, offscreenPass.depth.image, null);
            vkFreeMemory(device, offscreenPass.depth.mem, null);

            vkDestroyRenderPass(device, offscreenPass.renderPass, null);
            vkDestroySampler(device, offscreenPass.sampler, null);
            vkDestroyFramebuffer(device, offscreenPass.frameBuffer, null);

            vkDestroyPipeline(device, pipelines_radialBlur, null);
            vkDestroyPipeline(device, pipelines_phongPass, null);
            vkDestroyPipeline(device, pipelines_colorPass, null);
            vkDestroyPipeline(device, pipelines_offscreenDisplay, null);

            vkDestroyPipelineLayout(device, pipelineLayouts_radialBlur, null);
            vkDestroyPipelineLayout(device, pipelineLayouts_scene, null);

            vkDestroyDescriptorSetLayout(device, descriptorSetLayouts_scene, null);
            vkDestroyDescriptorSetLayout(device, descriptorSetLayouts_radialBlur, null);

            models_example.destroy();

            uniformBuffers_scene.destroy();
            uniformBuffers_blurParams.destroy();

            vkFreeCommandBuffers(device, cmdPool, 1, ref offscreenPass.commandBuffer);
            vkDestroySemaphore(device, offscreenPass.semaphore, null);

            textures_gradient.destroy();
        }