Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. How to close OpenGL Window opened using OpenGLUnderQML? [Solved]
Forum Updated to NodeBB v4.3 + New Features

How to close OpenGL Window opened using OpenGLUnderQML? [Solved]

Scheduled Pinned Locked Moved Mobile and Embedded
openglandroidqmlios
2 Posts 1 Posters 1.1k Views 1 Watching
  • 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.
  • T Offline
    T Offline
    teamAR
    wrote on last edited by teamAR
    #1

    I'm developing an app that has an augmented reality (AR) window that is invoked from a main window showing map data. Using "afterRendering" as described in the OpenGLUnderQML example, I am successfully rendering OpenGL images over the camera viewfinder image. When I exit the AR window the OpenGL thread keeps on rendering, over the map or any other screen I bring up. If I go back to the AR window a second time... a second OpenGL thread is opened, indeed you can create new threads over and over.

    Any suggestions on how to truly close/kill the OpenGLUnderQML thread upon exiting the AR window?

    I'm new to both OpenGL and Qt, hopefully I've just overlooked an obvious solution.

    Basics: Qt 5.4 on Mac, iOS and Android target.

    1 Reply Last reply
    0
    • T Offline
      T Offline
      teamAR
      wrote on last edited by
      #2

      The solution that worked for me is to keep the OpenGL window open all the time, and pass a flag from the QML code to indicate whether it should draw or not.

      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