46 VulkanWindow(
const std::string& title, std::shared_ptr<QueueHandle> queue);
49 GLFWwindow* GetWindow()
54 float GetContentScale();
56 virtual void Render();
58 std::shared_ptr<QueueHandle> GetRenderQueue()
61 void AddTextureUsedThisFrame(std::shared_ptr<Texture> tex)
69 void SetFullscreen(
bool fullscreen);
71 virtual void DoRender(vk::raii::CommandBuffer& cmdBuf);
72 virtual void RenderUI();
123 std::vector<std::unique_ptr<vk::raii::Fence> >
m_fences;
143 #if VK_HEADER_VERSION >= 229
Encapsulates the various Vulkan objects we need to represent texture image memory.
Definition: TextureManager.h:46
A GLFW window containing a Vulkan surface.
Definition: VulkanWindow.h:44
std::vector< std::unique_ptr< vk::raii::Semaphore > > m_renderCompleteSemaphores
Semaphore indicating frame is complete.
Definition: VulkanWindow.h:111
std::vector< VkImage > m_backBuffers
Back buffer images.
Definition: VulkanWindow.h:146
bool m_fullscreen
Fullscreen flag.
Definition: VulkanWindow.h:159
std::shared_ptr< vk::raii::SurfaceKHR > m_surface
Surface for drawing onto.
Definition: VulkanWindow.h:81
int m_width
Current window width.
Definition: VulkanWindow.h:153
std::vector< std::unique_ptr< vk::raii::Semaphore > > m_imageAcquiredSemaphores
Semaphore indicating framebuffer is ready.
Definition: VulkanWindow.h:108
VulkanWindow(const std::string &title, std::shared_ptr< QueueHandle > queue)
Creates a new top level window with the specified title.
Definition: VulkanWindow.cpp:60
int m_pendingHeight
Requested height for software resize.
Definition: VulkanWindow.h:99
int m_windowedWidth
Saved size before we went fullscreen.
Definition: VulkanWindow.h:168
int m_windowedX
Saved position before we went fullscreen.
Definition: VulkanWindow.h:162
bool m_resizeEventPending
Set true if we have to handle a resize event.
Definition: VulkanWindow.h:90
std::shared_ptr< vk::raii::DescriptorPool > m_imguiDescriptorPool
Descriptor pool for ImGui.
Definition: VulkanWindow.h:84
int m_minImageCount
The minimum image count for the backbuffer allowed by this GPU.
Definition: VulkanWindow.h:150
bool UpdateFramebuffer()
Updates the framebuffer.
Definition: VulkanWindow.cpp:303
std::vector< std::unique_ptr< vk::raii::CommandBuffer > > m_cmdBuffers
Frame command buffers.
Definition: VulkanWindow.h:105
int m_windowedHeight
Saved size before we went fullscreen.
Definition: VulkanWindow.h:171
GLFWwindow * m_window
The underlying GLFW window object.
Definition: VulkanWindow.h:75
std::vector< std::unique_ptr< vk::raii::ImageView > > m_backBufferViews
Back buffer view.
Definition: VulkanWindow.h:126
virtual ~VulkanWindow()
Destroys a VulkanWindow.
Definition: VulkanWindow.cpp:277
uint32_t m_frameIndex
Frame number for double buffering.
Definition: VulkanWindow.h:117
int m_height
Current window height.
Definition: VulkanWindow.h:156
std::vector< std::unique_ptr< vk::raii::Framebuffer > > m_framebuffers
Framebuffer.
Definition: VulkanWindow.h:129
std::unique_ptr< vk::raii::CommandPool > m_cmdPool
Frame command pool.
Definition: VulkanWindow.h:102
std::shared_ptr< QueueHandle > m_renderQueue
Queue for rendering to.
Definition: VulkanWindow.h:87
ImGuiContext * m_context
ImGui context for GUI objects.
Definition: VulkanWindow.h:78
uint32_t m_semaphoreIndex
Frame semaphore number for double buffering.
Definition: VulkanWindow.h:114
int m_windowedY
Saved position before we went fullscreen.
Definition: VulkanWindow.h:165
int m_pendingWidth
Requested width for software resize.
Definition: VulkanWindow.h:96
uint32_t m_lastFrameIndex
Frame number for double buffering.
Definition: VulkanWindow.h:120
bool m_softwareResizeRequested
Set true if a resize was requested by software (i.e. we need to resize to m_pendingWidth / m_pendingH...
Definition: VulkanWindow.h:93
std::vector< std::unique_ptr< vk::raii::Fence > > m_fences
Frame fences.
Definition: VulkanWindow.h:123
std::vector< std::set< std::shared_ptr< Texture > > > m_texturesUsedThisFrame
Textures used this frame.
Definition: VulkanWindow.h:174
std::unique_ptr< vk::raii::SwapchainKHR > m_swapchain
Swapchain for presenting to the screen.
Definition: VulkanWindow.h:135
std::unique_ptr< vk::raii::RenderPass > m_renderPass
Render pass for drawing everything.
Definition: VulkanWindow.h:132