// Copyright (C) 2020 Jérôme Leclercq // This file is part of the "Nazara Engine - Vulkan Renderer" // For conditions of distribution and use, see copyright notice in Config.hpp #include #include #include #include #include #include #include #include namespace Nz { VulkanDevice::~VulkanDevice() = default; std::shared_ptr VulkanDevice::InstantiateBuffer(BufferType type) { return std::make_shared(*this, type); } std::shared_ptr VulkanDevice::InstantiateCommandPool(QueueType queueType) { return std::make_shared(*this, queueType); } std::shared_ptr VulkanDevice::InstantiateRenderPipeline(RenderPipelineInfo pipelineInfo) { return std::make_shared(*this, std::move(pipelineInfo)); } std::shared_ptr VulkanDevice::InstantiateRenderPipelineLayout(RenderPipelineLayoutInfo pipelineLayoutInfo) { auto pipelineLayout = std::make_shared(); if (!pipelineLayout->Create(*this, std::move(pipelineLayoutInfo))) return {}; return pipelineLayout; } std::shared_ptr VulkanDevice::InstantiateShaderStage(ShaderStageType type, ShaderLanguage lang, const void* source, std::size_t sourceSize) { auto stage = std::make_shared(); if (!stage->Create(*this, type, lang, source, sourceSize)) return {}; return stage; } std::shared_ptr VulkanDevice::InstantiateTexture(const TextureInfo& params) { return std::make_shared(*this, params); } std::shared_ptr VulkanDevice::InstantiateTextureSampler(const TextureSamplerInfo& params) { return std::make_shared(*this, params); } }