Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to run code before Vulkan surface destruction
Forum Updated to NodeBB v4.3 + New Features

How to run code before Vulkan surface destruction

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 1 Posters 147 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    JackJ30
    wrote on last edited by
    #1

    I'm trying to write a vulkan renderer without using the built in class, just QVulkanInstance to get the surface for the window. Getting the surface and setting up a swapchain works fine, but when I close the application I get a validation layer message saying that the surface is being destroyed before the swapchain. No matter what I do I can't destroy the swapchain before the surface. The widget destructor runs after the surface destruction, the embedded window destructor runs after the surface destructor, and close events don't run at all.
    I'm not sure what to do, any help is greatly appreciated

    1 Reply Last reply
    0
    • J Offline
      J Offline
      JackJ30
      wrote on last edited by
      #2

      For anyone who cares in the future, the closeEvent on the mainwindow works. It's jank, but it works.

      1 Reply Last reply
      1

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved