Ejemplo n.º 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();
        }
Ejemplo n.º 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();
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 5
0
        public void Dispose()
        {
            // Clean up used Vulkan resources
            // Note : Inherited destructor cleans up resources stored in base class

            destroyTextureImage(texture);

            vkDestroyPipeline(device, pipelines_solid, null);

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

            vertexBuffer.destroy();
            indexBuffer.destroy();
            uniformBufferVS.destroy();
        }
Ejemplo n.º 6
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();
        }
Ejemplo n.º 7
0
        public void Dispose()
        {
            // Clean up used Vulkan resources
            // Note : Inherited destructor cleans up resources stored in base class
            vkDestroyPipeline(device, pipelines_solid, null);
            if (pipelines_wireframe != 0)
            {
                vkDestroyPipeline(device, pipelines_wireframe, null);
            }

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

            destroyModel(device);

            textures_colorMap.destroy();
            uniformBuffers_scene.destroy();
        }
Ejemplo n.º 8
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();
        }
        public void Dispose()
        {
            if (uboDataDynamic_model != null)
            {
                alignedFree(uboDataDynamic_model);
            }

            // Clean up used Vulkan resources
            // Note : Inherited destructor cleans up resources stored in base class
            vkDestroyPipeline(device, pipeline, null);

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

            vertexBuffer.destroy();
            indexBuffer.destroy();

            uniformBuffers_view.destroy();
            uniformBuffers_dynamic.destroy();
        }
Ejemplo n.º 10
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, textureArray.view, null);
            vkDestroyImage(device, textureArray.image, null);
            vkDestroySampler(device, textureArray.sampler, null);
            vkFreeMemory(device, textureArray.deviceMemory, null);

            vkDestroyPipeline(device, pipeline, null);

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

            vertexBuffer.destroy();
            indexBuffer.destroy();

            uniformBufferVS.destroy();

            // delete[] uboVS.instance;
        }