Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Minimum required version of OpenGL to run Qt 5.12.0 QtQuick compiled apps



  • Sorry, this is all QtQuick related.

    Okay, I have been developing on an Nvidia based system in Qt 5.12.0. Everything was working well. It is well supported and supports the latest OpenGL. However, I have been asked to do my development on a Windows 10 VM in Virtualbox. I have been having issues running the same apps in this VM. Using a default QtQuick generated app without setting any options I get a string of D3D errors:

    QOpenGLShaderProgram::uniformLocation(matrix): shader program is not linked
    QOpenGLShaderProgram::uniformLocation(textureScale): shader program is not linked
    QOpenGLShaderProgram::uniformLocation(color): shader program is not linked
    QOpenGLShaderProgram::uniformLocation(alphaMin): shader program is not linked
    QOpenGLShaderProgram::uniformLocation(alphaMax): shader program is not linked
    QOpenGLShaderProgram::uniformLocation(fontScale): shader program is not linked
    QOpenGLShaderProgram::uniformLocation(vecDelta): shader program is not linked
    

    If I run with this:

    QCoreApplication::setAttribute(Qt::AA_UseDesktopOpenGL);
    

    I get application crash:

    QML debugging is enabled. Only use this in a safe environment.
    15:34:40: The program has unexpectedly finished.
    15:34:40: The process was ended forcefully.
    

    So I did a bit of research and found that Virtualbox since Windows 8.1 has only officially supported OpenGL 1.1. I then found a tool called wglxinfo.exe and checked the version that my VM was reporting. It did return OpenGL 1.1.

    My question is this:
    What version of OpenGL is the minimum required to run Qt 5.12.0 compiled applications?

    Edit:
    Also, what version of D3D does QtQuick 5.12 support?



  • I must be frustrated, because I didn't do a search:
    https://doc.qt.io/qt-5/windows-requirements.html



  • Now I am really confused. I installed Qt on a different VM with Windows 10 on it and I can run QtQuick apps just fine. So somehow I borked my other Qt install on my other VM.


  • Moderators

    @fcarney said in Minimum required version of OpenGL to run Qt 5.12.0 QtQuick compiled apps:

    Now I am really confused. I installed Qt on a different VM with Windows 10 on it and I can run QtQuick apps just fine. So somehow I borked my other Qt install on my other VM.

    It always is the drivers and from my (limited) experience VMs are quite poor in that regard. See if the drivers are installed and virtualized correctly is my best advice.



  • The VM with problems was originally a Nvidia machine. Then it got turned into a VM. I installed drivers for the VM, but it is not correcting itself. The other VM works fine (brand new install). I may have to reinstall Windows on this machine to fix this. I tried installing the DirectX drivers, but it did not correct the issue. The lesson here may be that you need to do a clean install of the OS on a VM.


  • Moderators

    Honestly, I have no idea, but since it's a VM it should be easy enough to try and install a clean windows.



  • Okay, I reset the Windows 10 OS. Now I can compile and run the Qt apps with no D3D errors and no OpenGL errors.
    I am getting a DLL error when creator starts though.

    Is there a way to tell Qt to fix its install without having to reinstall Qt again? I did do an update on creator to the latest, but it still gives this DLL error:

    CONCRT140.dll
    

  • Moderators

    @fcarney said in Minimum required version of OpenGL to run Qt 5.12.0 QtQuick compiled apps:

    Is there a way to tell Qt to fix its install without having to reinstall Qt again? I did do an update on creator to the latest, but it still gives this DLL error

    No, this isn't a Qt error. You're missing the MSVC redistributable (or part of it). Download if from MS's site and install it. I think this should be the correct version.



  • Yeah, I just found that, Thank you!



  • Somehow this has regressed and doing a reset of Windows 10 is fixing this issue anymore. I am going to try reinstalling Qt to see is this is the solution. This is very frustrating.



    • Setup brand new install of Win10 on VM (VirtualBox)
    • Installed Qt 5.12.1 from web
    • Created test QtQuick app
    • Gives Angle and OpenGL errors when doing default detect opengl
    • Segfaults/dies when running with this option: QCoreApplication::setAttribute(Qt::AA_UseDesktopOpenGL);
    • Will run app with this option on: QCoreApplication::setAttribute(Qt::AA_UseSoftwareOpenGL);

    I also tried running the application on VMWare and I get the same failures. Even though VMWare has a more advanced representation of OpenGL and D3D than VirtualBox.

    So for a workaround I will be using:
    QCoreApplication::setAttribute(Qt::AA_UseSoftwareOpenGL);

    Supposedly slower, but rather have running than not. May setup command line to select this mode when testing in VM and not on a real machine.



  • Alternatively, if you want to simulate hardware opengl with the option Qt::AA_UseDesktopOpenGL then use the drivers from here:
    mesa drivers

    Edit:
    Dang it! Installing those drivers does allow running the app, BUT it causes permission errors with user accounts and prevents running anything with admin privileges. So I do NOT recommend them.

    Edit:
    Okay, this issue was caused by the VirtualBox implementation problems with D3D. Turning off 3D acceleration fixes the permissions issues.


Log in to reply