Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Handling graphics resources
QtWS25 Last Chance

Handling graphics resources

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
qmlopenglresourcesmemory
1 Posts 1 Posters 714 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.
  • R Offline
    R Offline
    roxlu
    wrote on last edited by
    #1

    Hi,

    I've been reading the Graphics Resource Section on this page, but I'm not sure how to handle the following situation. I've created a custom QML item that uses some custom openGL code (it creates it's own texture for example). I want to delete this texture and some other resources when QQuickItem::releaseResources() is called. Currently I schedule a render job with AfterRenderingStage to make sure the GL context is available. The cleanup works fine and my render job is executed. Though, directly after my job has been executed, my QQuickWindow::beforeRendering slot is called again. In my beforeRendering slot, I draw using the texture; but because it's removed (i.e. my render job has been executed in which I remove my textures), my app crashes because it tries to use cleaned up resources.

    I'm curious how I should handle the situation where QQuickWindow::releaseResources() is called. For example do I need to disconnect from the QQuickWindow::beforeRendering signal?

    Thanks
    roxlu

    1 Reply Last reply
    0

    • Login

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