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. The openGL display stays black under iOS

The openGL display stays black under iOS

Scheduled Pinned Locked Moved Solved Mobile and Embedded
10 Posts 3 Posters 1.2k 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.
  • F Offline
    F Offline
    Francky033
    wrote on last edited by Francky033
    #1

    Hello,

    I'm trying to transpose to iOs a qt + opengl application that runs without any problem on Windows, Linux, Android and macOS.

    The opengl display remains black in the simulator even if the Qml boxes display correctly.

    There is no error in the logs and there are no Opengl errors.

    I added
    <Key>PrefersOpenGL>/key>
    <True/>

    in the plist of the application but it doesn't change anything.

    Does anyone have any ideas?

    Thank you!

    PS: I'm using Qt 5.15.0 with ios 13.2

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Did you try to build the same application with an older version of Qt like 5.14.2 ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • F Offline
        F Offline
        Francky033
        wrote on last edited by
        #3

        I just tried with Qt 5.14.02 and 5.13.2 but it doesn't work unfortunately...

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Can you create a minimal compilable example that shows that behavior ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • F Offline
            F Offline
            Francky033
            wrote on last edited by
            #5

            Hi SGaist !

            I just found what's happening.

            In fact, it's the splah screen that I create from the QSplashScreen class that stays black and in the first plan, even after destroying it!
            The opengl display is not in question at all ...

            There is something to know about using the QSplashScreen class under iOs?
            I know that Apple offers UILaunchImage to do this but you can't display text on the image!

            J.HilkJ 1 Reply Last reply
            1
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Good catch !

              Widgets are working on mobile but they have not been specifically ported to these platforms.

              Sorry, I do not know what might go wrong there though.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • F Francky033

                Hi SGaist !

                I just found what's happening.

                In fact, it's the splah screen that I create from the QSplashScreen class that stays black and in the first plan, even after destroying it!
                The opengl display is not in question at all ...

                There is something to know about using the QSplashScreen class under iOs?
                I know that Apple offers UILaunchImage to do this but you can't display text on the image!

                J.HilkJ Offline
                J.HilkJ Offline
                J.Hilk
                Moderators
                wrote on last edited by
                #7

                @Francky033
                how do you use QSplashScreen ( on desktop?) can you show some code, it may help

                That said, QSplashScreen does not work like you think it does on mobile devices.

                It can only take effect once main() is called, before that the OS has specific options to display splash screen like stuff.

                On iOS you have correctly identified it as UILaunchImage, but you can also do it with a storyboard

                on Android it can be set in the manifest.xml file via splash_screen_drawable and splash_screen_sticky


                Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                Q: What's that?
                A: It's blue light.
                Q: What does it do?
                A: It turns blue.

                F 1 Reply Last reply
                0
                • J.HilkJ J.Hilk

                  @Francky033
                  how do you use QSplashScreen ( on desktop?) can you show some code, it may help

                  That said, QSplashScreen does not work like you think it does on mobile devices.

                  It can only take effect once main() is called, before that the OS has specific options to display splash screen like stuff.

                  On iOS you have correctly identified it as UILaunchImage, but you can also do it with a storyboard

                  on Android it can be set in the manifest.xml file via splash_screen_drawable and splash_screen_sticky

                  F Offline
                  F Offline
                  Francky033
                  wrote on last edited by
                  #8

                  Hello J.Hilk !

                  In the Desktop versions (mac, linux, windows), the object created with QSplashScreen is displayed perfectly well. It also works correctly under Android ....

                  It is only under ios that QSplashScreen displays a black screen in the foreground that does not disappear even after the destruction of the object!

                  On the other hand, I had also made a Splash Screen in QML. The splash is not displayed under ios, except after the displaying a messageBox ! The Splash is correctly displayed after it !

                  How to explain this ? Does a Messagebox destroy the default iiOs Splash Screen of the application ?

                  Does the display of a MessagerBox forces the system to treat all the events ?

                  The problem that I see with UILaunchImage is that it does not make it possible to display an image and the loading of the objects by the program for example.

                  J.HilkJ 1 Reply Last reply
                  0
                  • F Francky033

                    Hello J.Hilk !

                    In the Desktop versions (mac, linux, windows), the object created with QSplashScreen is displayed perfectly well. It also works correctly under Android ....

                    It is only under ios that QSplashScreen displays a black screen in the foreground that does not disappear even after the destruction of the object!

                    On the other hand, I had also made a Splash Screen in QML. The splash is not displayed under ios, except after the displaying a messageBox ! The Splash is correctly displayed after it !

                    How to explain this ? Does a Messagebox destroy the default iiOs Splash Screen of the application ?

                    Does the display of a MessagerBox forces the system to treat all the events ?

                    The problem that I see with UILaunchImage is that it does not make it possible to display an image and the loading of the objects by the program for example.

                    J.HilkJ Offline
                    J.HilkJ Offline
                    J.Hilk
                    Moderators
                    wrote on last edited by
                    #9

                    @Francky033
                    very strange

                    can you make a minimal compile-able example, so that we can test as well?


                    Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                    Q: What's that?
                    A: It's blue light.
                    Q: What does it do?
                    A: It turns blue.

                    F 1 Reply Last reply
                    0
                    • J.HilkJ J.Hilk

                      @Francky033
                      very strange

                      can you make a minimal compile-able example, so that we can test as well?

                      F Offline
                      F Offline
                      Francky033
                      wrote on last edited by
                      #10

                      hI !

                      I finally dropped the idea of making a qml Splash Screen on ios.
                      As I couldn't do it manually, I followed this great tutorial which explains how to design it using XCode :

                      https://www.youtube.com/watch?v=s4skYI4GaOg

                      Everything works now. I have a splash screen and an OpenGL window that work!

                      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