still working on code refactoring

This commit is contained in:
2024-04-23 22:59:33 +02:00
parent ace4c98945
commit 1d9a51e4f7
16 changed files with 560 additions and 518 deletions

View File

@@ -6,7 +6,7 @@
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/01/23 18:39:36 by maldavid #+# #+# */
/* Updated: 2024/04/23 19:49:02 by maldavid ### ########.fr */
/* Updated: 2024/04/23 22:14:48 by maldavid ### ########.fr */
/* */
/* ************************************************************************** */
@@ -30,11 +30,15 @@ namespace mlx
inline bool IsInit() const noexcept { return m_pool != nullptr && m_renderer != nullptr; }
void Bind() noexcept;
DescriptorSet Duplicate();
VkDescriptorSet& operator()() noexcept;
VkDescriptorSet& Get() noexcept;
inline const DescriptorSetLayout& GetLayout() const noexcept { return m_layout; }
inline const std::array<VkDescriptorSet, MAX_FRAMES_IN_FLIGHT>& GetAllFramesDescriptorSets() const { return m_desc_set; }
void Destroy() noexcept;
@@ -42,7 +46,7 @@ namespace mlx
~DescriptorSet() = default;
private:
DescriptorSetLayout p_layout;
DescriptorSetLayout m_layout;
std::array<VkDescriptorSet, MAX_FRAMES_IN_FLIGHT> m_desc_set;
NonOwningPtr<class DescriptorPool> p_pool;
NonOwningPtr<class Renderer> p_renderer;

View File

@@ -6,7 +6,7 @@
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/01/23 18:36:22 by maldavid #+# #+# */
/* Updated: 2024/04/23 19:50:50 by maldavid ### ########.fr */
/* Updated: 2024/04/23 22:15:01 by maldavid ### ########.fr */
/* */
/* ************************************************************************** */
@@ -23,8 +23,8 @@ namespace mlx
void Init(std::vector<std::pair<int, VkDescriptorType>> binds, VkShaderStageFlagBits stage);
void Destroy() noexcept;
inline VkDescriptorSetLayout& operator()() noexcept { return m_layout; }
inline VkDescriptorSetLayout& Get() noexcept { return m_layout; }
inline VkDescriptorSetLayout operator()() const noexcept { return m_layout; }
inline VkDescriptorSetLayout Get() const noexcept { return m_layout; }
inline const std::vector<std::pair<int, VkDescriptorType>>& GetBindings() const noexcept { return m_bindings; }
~DescriptorSetLayout() = default;