QT5.9 Windows7 64bit QWebEngine WebGL --Could not share GL contexts.



  • Hi.
    I would like to ask a question.
    When I used QT5.7 or QT5.8 QWebEngine, I think there is no problem. in watching webGL Page.
    But When I use QT5.9 QWebEngine,Most of All Page is not working..I got a Error Message

    [7816:2000:0602/095657.738:ERROR:gl_context_wgl.cc(78)] Could not share GL contexts.
    js: Error creating WebGL context.

    I checked it on QWebEngine sample project WebEngine Demo Browser and WebEngine simple browser and so on.

    for example,
    [page viewing successed]
    https://www.cubeslam.com/dsbkbx
    [page viewing failed]
    http://alteredqualia.com/three/examples/webgl_terrain_dynamic.html
    http://potree.org/demo/potree_1.3/showcase/lion_head_simone_garagnani.html
    etc..

    I think Error Page might be using three.js?

    when I access their failed Web page from Chrome Web Browser,there is no problem.but when I access their pages on from QT5.9 using webEngine application ,it is not.

    my environment is Windows7 or 10 ,64bit intel HD Graphics
    I try other PC,
    Windows10[64bit),GTX980Ti(newdriver applied)

    If there is any reason , Could you tell me solution?
    thanks



  • Did you manage to solve this? I'm using a WebView from QML, but get the same error when trying to render WebGL on Windows.



  • Hi,

    Got the same issue on all our workstations here (win7, win10, nvidia or intel gpu, directx 12), even though Google Chrome has no problem render 3D views.
    AFAIU, pre-compiled Qt binaries for windows are shipped by default with ANGLE as a graphic "gateway".
    I'm currently recompiling the lib with -opengl desktop option to use graphic cards OpenGL drivers and check if it solves the issue.
    Will post the answer when I'm done, hoping it could help

    Cheers



  • Well, after multiple recompile of the lib, with or without angle, angle combined, opengl desktop, opengl-es-2 still had context errors.
    Found on another thread of this forum that I should try to call :

    QCoreApplication::setAttribute(Qt::AA_UseOpenGLES);
    

    This removed all the warnings and context errors !
    Note that there is several value in the ApplicationAttribute enum that you could be interested in:

    AA_UseDesktopOpenGL = 15,
    AA_UseOpenGLES = 16,
    AA_UseSoftwareOpenGL = 17,
    AA_ShareOpenGLContexts = 18,
    

    -jee



  • @jee4404 I solve it follow your way. Thanks.
    At the beginning, I used QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts); but it didn't work.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.