From cfcb5c3212f0fce667885ff0de6fa0b9fc4b3ca8 Mon Sep 17 00:00:00 2001 From: ladevieq Date: Sat, 9 Jul 2022 23:45:26 +0200 Subject: Improve compilation time --- include/vk-renderer.hpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'include/vk-renderer.hpp') diff --git a/include/vk-renderer.hpp b/include/vk-renderer.hpp index 864bc48..a301a5b 100644 --- a/include/vk-renderer.hpp +++ b/include/vk-renderer.hpp @@ -1,8 +1,6 @@ #ifndef __VK_RENDERER_HPP_ #define __VK_RENDERER_HPP_ -#include -#include #include #include "vk-api.hpp" @@ -26,8 +24,6 @@ class vkrenderer { void begin_frame(); - void compute(uint32_t width, uint32_t height); - void finish_frame(); void recreate_swapchain(); @@ -52,19 +48,23 @@ class vkrenderer { void render(); - uint32_t frame_index() { return this->virtual_frame_index; } + [[nodiscard]]uint32_t frame_index() const { return this->virtual_frame_index; } - Texture* back_buffer() { return swapchain_textures[swapchain_image_index]; } + [[nodiscard]]Texture* back_buffer() const { return swapchain_textures[swapchain_image_index]; } - VkFormat back_buffer_format() { return swapchain.surface_format.format; } + [[nodiscard]]VkFormat back_buffer_format() const { return swapchain.surface_format.format; } static constexpr uint32_t virtual_frames_count = 2; + vkcontext context; + + vkapi api; + private: void handle_swapchain_result(VkResult function_result); - vkapi api; + // vkapi api; std::vector renderpasses; @@ -78,9 +78,9 @@ class vkrenderer { pipeline tonemapping_pipeline; - std::vector submission_fences; - std::vector execution_semaphores; - std::vector acquire_semaphores; + VkFence submission_fences[virtual_frames_count]; + VkSemaphore execution_semaphores[virtual_frames_count]; + VkSemaphore acquire_semaphores[virtual_frames_count]; VkSurfaceKHR platform_surface; swapchain swapchain; -- cgit v1.3