Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QtWebEngine
  4. enabled Web3Gl
Forum Updated to NodeBB v4.3 + New Features

enabled Web3Gl

Scheduled Pinned Locked Moved Solved QtWebEngine
2 Posts 1 Posters 805 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.
  • elicatE Offline
    elicatE Offline
    elicat
    wrote on last edited by
    #1

    hello,
    I have to use a graphics library in my project with QML / QWebEngine.
    I set and tested the WebGL enablement.
    Usage VS2017 / Windows is QT 5.11
    I have performed the following steps
    In the QML file

    import QtWebEngine 1.6
            WebEngineView {
                id: viewEnginePgm
                settings.webGLEnabled: true
    

    At the opening of the application

    QCoreApplication :: setAttribute (Qt :: AA_UseDesktopOpenGL);
    QCoreApplication :: setAttribute (Qt :: AA_UseSoftwareOpenGL);
    

    In the .pro file

    LIBS + = opengl32.lib
    

    The result is always the same.
    Does anyone have an idea to solve it?
    Thanks

    0_1559821677916_testwebgl.PNG

    Saluti, Gianfranco Elicat

    1 Reply Last reply
    0
    • elicatE Offline
      elicatE Offline
      elicat
      wrote on last edited by
      #2

      Install QT version 5.14.0 and make only this into main.cpp

      QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
      
      	bool ret;
      	ret = qputenv("QTWEBENGINE_CHROMIUM_FLAGS", " --ignore-gpu-blacklist --enable-gpu-rasterization --enable-oop-rasterization --use-angle");
      /* this only for print into console.log */
      	ret = qputenv("QSG_INFO", "1");
      	ret = qputenv("QT_OPENGL", "angle");
      	ret = qputenv("QT_ANGLE_PLATFORM", "d3d11");
      	ret = qputenv("QSG_RENDER_LOOP", "basic");
      
      	QApplication::setAttribute(Qt::AA_UseOpenGLES);
      	QCoreApplication::setAttribute(Qt::AA_UseOpenGLES);
      	QGuiApplication::setAttribute(Qt::AA_UseOpenGLES);
      
      	QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts);
      	QGuiApplication app(argc, argv);
      

      Saluti, Gianfranco Elicat

      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