ngscopeclient 0.1-dev+51fbda87c
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
VulkanWindow Class Reference

A GLFW window containing a Vulkan surface. More...

#include <VulkanWindow.h>

Inheritance diagram for VulkanWindow:
Inheritance graph
[legend]

Public Member Functions

 VulkanWindow (const std::string &title, std::shared_ptr< QueueHandle > queue)
 Creates a new top level window with the specified title.
 
virtual ~VulkanWindow ()
 Destroys a VulkanWindow.
 
GLFWwindow * GetWindow ()
 
float GetContentScale ()
 
virtual void Render ()
 
std::shared_ptr< QueueHandleGetRenderQueue ()
 
void AddTextureUsedThisFrame (std::shared_ptr< Texture > tex)
 
bool IsFullscreen ()
 

Protected Member Functions

bool UpdateFramebuffer ()
 Updates the framebuffer.
 
void SetFullscreen (bool fullscreen)
 
virtual void DoRender (vk::raii::CommandBuffer &cmdBuf)
 
virtual void RenderUI ()
 

Protected Attributes

GLFWwindow * m_window
 The underlying GLFW window object.
 
ImGuiContext * m_context
 ImGui context for GUI objects.
 
std::shared_ptr< vk::raii::SurfaceKHR > m_surface
 Surface for drawing onto.
 
std::shared_ptr< vk::raii::DescriptorPool > m_imguiDescriptorPool
 Descriptor pool for ImGui.
 
std::shared_ptr< QueueHandlem_renderQueue
 Queue for rendering to.
 
bool m_resizeEventPending
 Set true if we have to handle a resize event.
 
bool m_softwareResizeRequested
 Set true if a resize was requested by software (i.e. we need to resize to m_pendingWidth / m_pendingHeight)
 
int m_pendingWidth
 Requested width for software resize.
 
int m_pendingHeight
 Requested height for software resize.
 
std::unique_ptr< vk::raii::CommandPool > m_cmdPool
 Frame command pool.
 
std::vector< std::unique_ptr< vk::raii::CommandBuffer > > m_cmdBuffers
 Frame command buffers.
 
std::vector< std::unique_ptr< vk::raii::Semaphore > > m_imageAcquiredSemaphores
 Semaphore indicating framebuffer is ready.
 
std::vector< std::unique_ptr< vk::raii::Semaphore > > m_renderCompleteSemaphores
 Semaphore indicating frame is complete.
 
uint32_t m_semaphoreIndex
 Frame semaphore number for double buffering.
 
uint32_t m_frameIndex
 Frame number for double buffering.
 
uint32_t m_lastFrameIndex
 Frame number for double buffering.
 
std::vector< std::unique_ptr< vk::raii::Fence > > m_fences
 Frame fences.
 
std::vector< std::unique_ptr< vk::raii::ImageView > > m_backBufferViews
 Back buffer view.
 
std::vector< std::unique_ptr< vk::raii::Framebuffer > > m_framebuffers
 Framebuffer.
 
std::unique_ptr< vk::raii::RenderPass > m_renderPass
 Render pass for drawing everything.
 
std::unique_ptr< vk::raii::SwapchainKHR > m_swapchain
 Swapchain for presenting to the screen.
 
std::vector< VkImage > m_backBuffers
 Back buffer images. More...
 
int m_minImageCount
 The minimum image count for the backbuffer allowed by this GPU.
 
int m_width
 Current window width.
 
int m_height
 Current window height.
 
bool m_fullscreen
 Fullscreen flag.
 
int m_windowedX
 Saved position before we went fullscreen.
 
int m_windowedY
 Saved position before we went fullscreen.
 
int m_windowedWidth
 Saved size before we went fullscreen.
 
int m_windowedHeight
 Saved size before we went fullscreen.
 
std::vector< std::set< std::shared_ptr< Texture > > > m_texturesUsedThisFrame
 Textures used this frame.
 

Detailed Description

A GLFW window containing a Vulkan surface.

Member Data Documentation

◆ m_backBuffers

std::vector<VkImage> VulkanWindow::m_backBuffers
protected

Back buffer images.

Note that the return value of SwapchainKHR::getImages() changed in the 1.3.229 Vulkan SDK See https://github.com/KhronosGroup/Vulkan-Hpp/issues/1417


The documentation for this class was generated from the following files: