简体   繁体   中英

qtwebkit qt5 beta webgl

I was trying to run WebGL application on QtWebKit (Qt 5.0 beta Version). I am using eglfs plugin on a mips based platform. I used QtTestBrowser as the test browser.

I ran an webgl site-

./QtTestBrowser -webgl -graphicsbased http://jsbin.com/ulazel

It reported no-webgl support.

I did a bit of debugging and found that in file

qtwebkit/Source/WebKit/qt/WebCoreSupport/PageClientQt.cpp

it returns as it cannot find glViewport:

QGLWidget* glViewport = qobject_cast<QGLWidget*>(scrollArea->viewport());
    if (!glViewport) {
        //Returns from here....
        return;
    }

By enabling “-gl-viewport” I was able to get the glContext in HTML page. But it was not properly displayed. Also since every widget (launcherWindow etc) it was trying to create a “Window” intern calling eglCreateWindow() and resulting in memory issues (Around 12 window was created all full size of 1920×1080. Finally the displayed image is also not proper.

Any one have suggestion? where i am going wrong?

WebGL is functional with additional patches on top of Qt5. You might want to take a look at the patchset for WebGL for eglfs, at the below link.

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

(Note - I have validated this only on ARMv7, but I cannot see a dependency on arch for this patchset)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM