54 float GetContentScale();
56 virtual void Render();
58 std::shared_ptr<QueueHandle> GetRenderQueue()
61 void AddTextureUsedThisFrame(std::shared_ptr<Texture>
tex)
67 void SaveWindowPositionAndSize();
80 virtual void DoRender(vk::raii::CommandBuffer& cmdBuf);
81 virtual void RenderUI();
132 std::vector<std::unique_ptr<vk::raii::Fence> >
m_fences;
152 #if VK_HEADER_VERSION >= 229
Definition AcceleratorBuffer.h:204
Encapsulates the various Vulkan objects we need to represent texture image memory.
Definition TextureManager.h:48
A GLFW window containing a Vulkan surface.
Definition VulkanWindow.h:44
bool m_forceDPIScaling
True if user asked (via NGSCOPECLIENT_UI_SCALE or NGSCOPECLIENT_FONT_SCALE environment variable) to f...
Definition VulkanWindow.h:174
std::vector< std::unique_ptr< vk::raii::Semaphore > > m_renderCompleteSemaphores
Semaphore indicating frame is complete.
Definition VulkanWindow.h:120
std::vector< VkImage > m_backBuffers
Back buffer images.
Definition VulkanWindow.h:155
bool m_fullscreen
Fullscreen flag.
Definition VulkanWindow.h:168
std::shared_ptr< vk::raii::SurfaceKHR > m_surface
Surface for drawing onto.
Definition VulkanWindow.h:90
bool m_restore
True if user asked (via command line argument) not to restore previous window state.
Definition VulkanWindow.h:171
int m_width
Current window width.
Definition VulkanWindow.h:162
std::vector< std::unique_ptr< vk::raii::Semaphore > > m_imageAcquiredSemaphores
Semaphore indicating framebuffer is ready.
Definition VulkanWindow.h:117
int m_pendingHeight
Requested height for software resize.
Definition VulkanWindow.h:108
int m_windowedWidth
Saved size before we went fullscreen.
Definition VulkanWindow.h:189
int m_windowedX
Saved position before we went fullscreen.
Definition VulkanWindow.h:183
bool m_resizeEventPending
Set true if we have to handle a resize event.
Definition VulkanWindow.h:99
std::shared_ptr< vk::raii::DescriptorPool > m_imguiDescriptorPool
Descriptor pool for ImGui.
Definition VulkanWindow.h:93
int m_minImageCount
The minimum image count for the backbuffer allowed by this GPU.
Definition VulkanWindow.h:159
bool UpdateFramebuffer()
Updates the framebuffer.
Definition VulkanWindow.cpp:429
std::vector< std::unique_ptr< vk::raii::CommandBuffer > > m_cmdBuffers
Frame command buffers.
Definition VulkanWindow.h:114
int m_windowedHeight
Saved size before we went fullscreen.
Definition VulkanWindow.h:192
GLFWwindow * m_window
The underlying GLFW window object.
Definition VulkanWindow.h:84
std::vector< std::unique_ptr< vk::raii::ImageView > > m_backBufferViews
Back buffer view.
Definition VulkanWindow.h:135
std::string m_title
Window title.
Definition VulkanWindow.h:198
virtual ~VulkanWindow()
Destroys a VulkanWindow.
Definition VulkanWindow.cpp:401
uint32_t m_frameIndex
Frame number for double buffering.
Definition VulkanWindow.h:126
int m_height
Current window height.
Definition VulkanWindow.h:165
std::vector< std::unique_ptr< vk::raii::Framebuffer > > m_framebuffers
Framebuffer.
Definition VulkanWindow.h:138
std::unique_ptr< vk::raii::CommandPool > m_cmdPool
Frame command pool.
Definition VulkanWindow.h:111
std::shared_ptr< QueueHandle > m_renderQueue
Queue for rendering to.
Definition VulkanWindow.h:96
float m_forcedFontScale
Forced font DPI scale value.
Definition VulkanWindow.h:177
ImGuiContext * m_context
ImGui context for GUI objects.
Definition VulkanWindow.h:87
uint32_t m_semaphoreIndex
Frame semaphore number for double buffering.
Definition VulkanWindow.h:123
int m_windowedY
Saved position before we went fullscreen.
Definition VulkanWindow.h:186
float m_forcedUIScale
Forced UI DPI scale value.
Definition VulkanWindow.h:180
int m_pendingWidth
Requested width for software resize.
Definition VulkanWindow.h:105
uint32_t m_lastFrameIndex
Frame number for double buffering.
Definition VulkanWindow.h:129
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:102
std::vector< std::unique_ptr< vk::raii::Fence > > m_fences
Frame fences.
Definition VulkanWindow.h:132
std::vector< std::set< std::shared_ptr< Texture > > > m_texturesUsedThisFrame
Textures used this frame.
Definition VulkanWindow.h:195
std::unique_ptr< vk::raii::SwapchainKHR > m_swapchain
Swapchain for presenting to the screen.
Definition VulkanWindow.h:144
std::unique_ptr< vk::raii::RenderPass > m_renderPass
Render pass for drawing everything.
Definition VulkanWindow.h:141