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. Any one has hellogl_es2 demo running with 5.2?
Qt 6.11 is out! See what's new in the release blog

Any one has hellogl_es2 demo running with 5.2?

Scheduled Pinned Locked Moved Mobile and Embedded
8 Posts 3 Posters 3.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.
  • S Offline
    S Offline
    sftrytry
    wrote on last edited by
    #1

    5.1.1 works fine for me.

    But no luck with 5.2. It just crash. I tried it on my xoom, evo 3d, and kindle fire hd7. It crashes no all of them. I am wondering any one can run it on your lastest devices, such as N7 2nd.

    I can have openglunderqml running with no problem. Any clue?

    Maybe I have to stay on 5.1.1

    1 Reply Last reply
    0
    • L Offline
      L Offline
      ltr6
      wrote on last edited by
      #2

      Got it working on my devices by commenting lines 67-77 in mainwindow.cpp, where the groupbox and layout is created.

      Then add glwidget->show() somewhere in mainwindow.cpp

      Calling setCentralWidget() on a QGLWidget seems to result in a crash.

      @// QGroupBox * groupBox = new QGroupBox(this);
      // setCentralWidget(groupBox);
      // groupBox->setTitle("OpenGL ES Example");

      // QGridLayout *layout = new QGridLayout(groupBox);

      // layout->addWidget(glwidget,1,0,8,1);
      // layout->addWidget(label,9,0,1,1);
      // layout->addWidget(slider, 11,0,1,1);

      // groupBox->setLayout(layout);@

      1 Reply Last reply
      0
      • S Offline
        S Offline
        sftrytry
        wrote on last edited by
        #3

        Commenting QGruopBox did stop crashing. Shall we report this bug to upstream?

        Although it does not crash, I got only blackscreen, like cube demo.

        In 5.1.1, hellogl_es2 works fine, but cube gives blackscreen. In 5.2, both are just blackscreen.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          sftrytry
          wrote on last edited by
          #4

          I followed this post "http://qt-project.org/forums/viewthread/32978", to get cube working some how.

          Geomertry is rendered and touches are responded. There is no shading, or texture.

          1 Reply Last reply
          0
          • L Offline
            L Offline
            ltr6
            wrote on last edited by
            #5

            [quote author="sftrytry" date="1387297898"]Commenting QGruopBox did stop crashing. Shall we report this bug to upstream?

            Although it does not crash, I got only blackscreen, like cube demo.

            In 5.1.1, hellogl_es2 works fine, but cube gives blackscreen. In 5.2, both are just blackscreen.[/quote]

            Did you call show() for the glwidget?

            1 Reply Last reply
            0
            • S Offline
              S Offline
              sftrytry
              wrote on last edited by
              #6

              Neither of the demos calls show(). They work on Desktop, and hellogl_es2 works with 5.1.1 originally without calling show().

              1 Reply Last reply
              0
              • L Offline
                L Offline
                ltr6
                wrote on last edited by
                #7

                Did you try it? When I don't call glwidget->show(), I get the black screen you were talking about.

                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  agocs
                  wrote on last edited by
                  #8

                  That's because mobile platforms running on eglfs have difficulties with supporting multiple native windows. In an application like hellogl_es2 the main window and the QGLWidget both need a native window under the hood. On desktop this is fine and hellogl_es2 works well (for example on xcb + EGL), but on Android or Embedded Linux it most likely won't.

                  As for Android some sort of solution is likely to come at some point in the future, see https://bugreports.qt-project.org/browse/QTBUG-34650
                  In the meantime try avoiding mixing OpenGL windows with others. While having a single fullscreen QGLWidget or QQuickView is fine, mixing it with a widget-based UI is 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