Important: Please read the Qt Code of Conduct -

QT-5.5: Empty window on AmazonWorkSpace/EC2. How to use ANGLE?

  • Hello,
    I am trying to build and run a MSVC 2013 project with Qt 5.5/QML parts on an Amazon Workspace, an EC2 Instance.

    It compiles fine but when I run it, only an empty window pops up and in the Debug-Output I get this messages:

    QOpenGLShaderProgram::uniformLocation( matrix ): shader program is not linked
    QOpenGLShaderProgram::uniformLocation( color ): shader program is not linked
    QOpenGLShaderProgram::uniformLocation( textureScale ): shader program is not linked
    QOpenGLShaderProgram::uniformLocation( dpr ): shader program is not linked
    QOpenGLShaderProgram: could not create shader program
    QOpenGLShader: could not create shader
    QOpenGLShader: could not create shader
    shader compilation failed:

    I know it has something to do with OpenGL not available on VMs and using ANGLE instead (It still uses OpenGL, It's set up as a static build). But how can I make Visual Studio to compile my code with ANGLE?
    The default examples that came with Qt--Creator are working fine.

    Thanks for advice!

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Something's not clear, do you mean you are using a static build of Qt or of your application ?

    If you are using a recent version of Qt, the switch between ANGLE and Desktop OpenGL should happen automatically.

  • Thanks for the quick reply!

    It's the application that is built statically.

    I know ANGLE is selected automatically, but since my project is built specifically against OpenGL on other platforms, eg with:

    I now would like to know with which libs I should replace the above.


  • Lifetime Qt Champion

    What other platforms ? ANGLE is a Windows specific backend. If your EC2 machine doesn't provide desktop OpenGL drivers then it will use ANGLE.

  • Sorry for not being clear:

    I have the problems on the EC2 instance with Windows 2008 RC2 Datacenter.

    The code runs fine on all desktop PCs and Notebooks with Win7 - Win10.

    As it should work out of the box maybe I'm wrong and it is not related to ANGLE at all?!

    Do you have any other idea what might cause this error?

  • Lifetime Qt Champion

    That I understood, the question is: what kind of graphic driver does that instance provide ?

  • The Device-Manager says the Display Adapter is a Standard VGA Graphics Adapter with the standard Windows driver.

    Maybe I also should add that 3D-accelaration is not available ...

  • Lifetime Qt Champion

    Are you using some desktop only OpenGL elements ?

    You can find more information about what is achievable here

  • Well, in the code are Qt Quick 2.4 elements used. Might this cause the problems?

    I've read through the page and as far as I understand I need to compile Qt with ANGLE support?

    I tried setting all the quoted environment variables without any result.

    QT_D3DCOMPILER_DLL: C:\Qt\5.5\msvc2013\bin\d3dcompiler_47.dll

  • Lifetime Qt Champion

    Qt's pre-built package uses a dynamic switcher that will automatically choose the backend. However, you wrote that there's no 3D acceleration so I'm not sure you will even have DirectX available for ANGLE to work.

  • Through dxdiag I found out that DirectX11 is installed.

    I also learned from a colleague, that the same problem occurs on other VMs with 3D-acceleration enabled. I couldn't test this myself yet.

Log in to reply