// Copyright 2022 Simon Boyé #pragma once #include #include #include #include namespace vk { class PipelineLayout: public Wrapper { public: PipelineLayout() noexcept; PipelineLayout( Context& context, Array set_layouts, Array push_constant_ranges={} ); PipelineLayout(const PipelineLayout&) = default; PipelineLayout(PipelineLayout&& other) noexcept; ~PipelineLayout() noexcept; PipelineLayout& operator=(const PipelineLayout&) = default; PipelineLayout& operator=(PipelineLayout&& other) noexcept; explicit inline operator bool() const noexcept { return !is_null(); } inline bool is_null() const noexcept { return m_pipeline_layout == VK_NULL_HANDLE; } inline operator VkPipelineLayout() noexcept { return m_pipeline_layout; } inline VkPipelineLayout pipeline_layout() noexcept { return m_pipeline_layout; } inline void swap(PipelineLayout& other) noexcept { using std::swap; Wrapper::swap(other); swap(m_pipeline_layout, other.m_pipeline_layout); } friend inline void swap(PipelineLayout& pipeline_layout_0, PipelineLayout& pipeline_layout_1) noexcept { pipeline_layout_0.swap(pipeline_layout_1); } void destroy() noexcept; private: VkPipelineLayout m_pipeline_layout = VK_NULL_HANDLE; }; }