TheAtlasEngine
 
Loading...
Searching...
No Matches
vk_window.hpp
1#pragma once
2#include <core/window.hpp>
3#include <GLFW/glfw3.h>
4#include <drivers/vulkan-cpp/vk_swapchain.hpp>
5
6namespace atlas::vk {
7 class vk_window : public window {
8 public:
9 vk_window(const window_settings& p_settings);
10 ~vk_window() override;
11
12 private:
13 void center_window();
14
15 private:
16 [[nodiscard]] window_settings settings() const override;
17
18 [[nodiscard]] vk_swapchain window_swapchain() const override {
19 return m_swapchain;
20 }
21
22 [[nodiscard]] uint32_t read_acquired_next_frame() override;
23
24 [[nodiscard]] GLFWwindow* native_window() const override;
25
26 void presentation_process(const uint32_t& p_current_frame) override;
27
28 [[nodiscard]] ::vk::command_buffer current_active_command(
29 uint32_t p_frame_idx) override {
30 return m_swapchain.active_command(p_frame_idx);
31 }
32
33 private:
34 VkInstance m_instance_handler = nullptr;
35 GLFWwindow* m_window_handler = nullptr;
36 VkSurfaceKHR m_window_surface = nullptr;
37 window_settings m_settings{};
38
39 vk_swapchain m_swapchain{};
40 static vk_window* s_instance;
41 };
42};
Definition vk_swapchain.hpp:19
::vk::command_buffer active_command(uint32_t p_frame_index)
Definition vk_swapchain.hpp:35
Definition vk_window.hpp:7
Represent an entire window that lives throughout the entire duration of the application.
Definition window.hpp:18
settings for specification for atlas::window
Definition types.hpp:9