コード例 #1
0
ファイル: inputattachments.cpp プロジェクト: gan74/Vulkan
	~VulkanExample()
	{
		// Clean up used Vulkan resources 
		// Note : Inherited destructor cleans up resources stored in base class

		vkDestroyImageView(device, attachments.color.view, nullptr);
		vkDestroyImage(device, attachments.color.image, nullptr);
		vkFreeMemory(device, attachments.color.memory, nullptr);

		vkDestroyImageView(device, attachments.depth.view, nullptr);
		vkDestroyImage(device, attachments.depth.image, nullptr);
		vkFreeMemory(device, attachments.depth.memory, nullptr);

		vkDestroyPipeline(device, pipelines.attachmentRead, nullptr);
		vkDestroyPipeline(device, pipelines.attachmentWrite, nullptr);

		vkDestroyPipelineLayout(device, pipelineLayouts.attachmentWrite, nullptr);
		vkDestroyPipelineLayout(device, pipelineLayouts.attachmentRead, nullptr);

		vkDestroyDescriptorSetLayout(device, descriptorSetLayouts.attachmentWrite, nullptr);
		vkDestroyDescriptorSetLayout(device, descriptorSetLayouts.attachmentRead, nullptr);

		vkDestroyRenderPass(device, uiRenderPass, nullptr);

		scene.destroy();
		uniformBuffers.matrices.destroy();
		uniformBuffers.params.destroy();
	}
コード例 #2
0
	void loadAssets()
	{
		model.loadFromFile(getAssetPath() + "models/geosphere.obj", vertexLayout, OBJ_DIM, vulkanDevice, queue);

		// Setup random materials for every object in the scene
		for (uint32_t i = 0; i < objects.size(); i++) {
			objects[i].setRandomMaterial();
		}
	}
コード例 #3
0
	~VulkanExample()
	{
		vkDestroyPipeline(device, pipeline, nullptr);

		vkDestroyPipelineLayout(device, pipelineLayout, nullptr);
		vkDestroyDescriptorSetLayout(device, descriptorSetLayouts.scene, nullptr);
		vkDestroyDescriptorSetLayout(device, descriptorSetLayouts.object, nullptr);

		model.destroy();

		uniformBuffers.scene.destroy();
	}
コード例 #4
0
ファイル: inputattachments.cpp プロジェクト: gan74/Vulkan
	void loadAssets()
	{
		scene.loadFromFile(getAssetPath() + "models/samplebuilding.dae", vertexLayout, 1.0f, vulkanDevice, queue);
	}