Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. QT5 with EGLFS - WebGL not working
Forum Updated to NodeBB v4.3 + New Features

QT5 with EGLFS - WebGL not working

Scheduled Pinned Locked Moved Qt WebKit
16 Posts 5 Posters 12.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.
  • P Offline
    P Offline
    prabindh
    wrote on last edited by
    #3

    WebGL is indeed available in non-X platforms.

    When you built Webkit - did the configure step show WebGL-yes, as shown in my configuration below ?

    http://www.gpupowered.org/node/15

    1 Reply Last reply
    0
    • N Offline
      N Offline
      nvharisha
      wrote on last edited by
      #4

      It configures WebGL but for EGLFS, it lacks implementation of GLSruface and GLContext.
      Hence when HTML request webgl-context, it returns null .

      Hari

      1 Reply Last reply
      0
      • P Offline
        P Offline
        prabindh
        wrote on last edited by
        #5

        You can use the (dirty) patchset attached to the bug report at,

        https://bugreports.qt-project.org/browse/QTBUG-30405

        I will update some of the patches soon,

        1 Reply Last reply
        0
        • P Offline
          P Offline
          prabindh
          wrote on last edited by
          #6

          Can you please check now - I have updated ? For some reason, comments did not get posted, or I might have closed the window too soon earlier.

          1 Reply Last reply
          0
          • N Offline
            N Offline
            nvharisha
            wrote on last edited by
            #7

            Actually, I tried to create a EGLContext and EGLSurface in the 3DPrivate class. But it requires the QOpenGLContext class.

            Hence I tried deriving class QPlatformOpenGLContext. But with this setContext() is called from QOpenGLContext. This is done in QOpenGLContext::create(), which takes: QGuiApplicationPrivate::platformIntegration()->createPlatformOpenGLContext(this); to set the context.

            So just introduce a QGLWidget. Now this shows only WebGL screen and not "blending" with the actual screen.

            I will take look at your changes. Mean while if you have any suggestion, let me know.

            Hari

            1 Reply Last reply
            0
            • N Offline
              N Offline
              nvharisha
              wrote on last edited by
              #8

              With the patch, I was not able to run the GL pages.
              First, while compiling I had to disable inclusion of X libraries.
              After running swapbuffer() was giving the error:
              @
              QOpenGLContext::swapBuffers() called with non-opengl surface
              QOpenGLContext::swapBuffers() called with non-opengl surface
              QOpenGLContext::swapBuffers() called with non-opengl surface
              QOpenGLContext::swapBuffers() called with non-opengl surface
              ...
              ...
              @

              I was trying to run:

              "http://www.erpoyart.com/jsdyn/":http://www.erpoyart.com/jsdyn/

              Hari

              1 Reply Last reply
              0
              • P Offline
                P Offline
                prabindh
                wrote on last edited by
                #9

                Can you please post the command line you are using to run ?

                1 Reply Last reply
                0
                • N Offline
                  N Offline
                  nvharisha
                  wrote on last edited by
                  #10

                  @./QtTestBrowser -graphicsbased -gl-viewport -webgl http://www.erpoyart.com/jsdyn/@

                  Hari

                  1 Reply Last reply
                  0
                  • N Offline
                    N Offline
                    nvharisha
                    wrote on last edited by
                    #11

                    Actually I was checking .. looks like even though it prints the error which i have reported for some time, but later i see that FPS saying that as per App, WebGL is working. But its not visible. I just put a print in the
                    @
                    GraphicsSurface::platformPaintToTextureMapper
                    @

                    and its printing.

                    Does that mean only "display" or final blit on to surface is not happening??

                    Hari

                    1 Reply Last reply
                    0
                    • C Offline
                      C Offline
                      Carewolf
                      wrote on last edited by
                      #12

                      "QOpenGLContext::swapBuffers() called with non-opengl surface"

                      Can be solved by marking all EGLFSWindows as OpenGLSurface in qeglfswindow.cpp.

                      1 Reply Last reply
                      0
                      • P Offline
                        P Offline
                        prabindh
                        wrote on last edited by
                        #13

                        Hello Hari,

                        Its been a while since I worked on this, I found that qt5.1.x has an issue with WebGL that needs a fix in the eglfs plugin that causes the issue you mention below. I posted my patch-set here:

                        https://github.com/prabindh/qt-configs/tree/master/webgl_5.1.1

                        You also need to take in the qeglfswindow patch2 from below:

                        https://github.com/prabindh/qt-configs/tree/master/qt5_1_1_Sep13

                        bq. >> Actually I was checking .. looks like even though it prints the error which i have reported for some time, but later i see that FPS saying that as per App, WebGL is working. But its not visible

                        1 Reply Last reply
                        0
                        • E Offline
                          E Offline
                          elkhunter
                          wrote on last edited by
                          #14

                          Hi Prabindh,

                          How are your eglfs patches licensed? Can they be used with the commercial version of QT? Or are your patches GPL only?

                          Thanks in advance.

                          1 Reply Last reply
                          0
                          • P Offline
                            P Offline
                            prabindh
                            wrote on last edited by
                            #15

                            There is a Qt5 contributor agreement that I have to go through when I find some time. You might want to check with the Qt5 dev community on (1) the status of these patches if the agreement is not yet signed, and (2) does a patch apply concurrently on both commercial/LGPL or not.

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

                              Hi,

                              Since you have found a fix for these bugs, why not submit the patches ? Once they are approved they will be integrated so everybody can benefit from them

                              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

                              • Login

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