Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
WebGL and Remote Desktop
I make extensive use of WebGL to implement some shaders I need for an image viewer, and this also works just fine within the WebEngine widget on my Windows laptop, but when I run the application on a remote Windows machine that I connect to via RDP / Remote Desktop the WebGL context doesn't work. I know that applications running through a Remote Desktop connection cannot directly access hardware accelerated OpenGL, but in other applications, like e.g. the browsers I have on the remote machine, they make use of Microsoft's OpenGL 1.1 software renderer fallback in these situations, making it possible to run OpenGL in software instead. This is disabled in Qt's webengine, so it doesn't work.
I've created this small test application that loads http://webglreport.com/ into a QWebEngineView where you can see that WebGL is disabled:
Does anyone know:
- If there is a workaround for this to get WebGL rendering working over a Remote Desktop connection in my Qt application, and
- If there are any plans to enable the fallback to the OpenGL 1.1 software renderer in the WebEngine views?
Hi Mads og velkommen til forummet ( hi and welcome to the forum)
To use openGL over Remote Desktop , you must connect to the (root) console
Often this is done with a batch file containing
tscon 1 /dest:console
start "C:\Program Files\ what ever open gl app you want"
@mrjj thank you for your reply.
I've seen the page you link to before. As I understand it, this solution will close the remote desktop connection and launch the application. I then need to re-connect using the remote desktion client. This solution makes sure that the application is launched with hardware access on a local session, and while it's ok for me while developing the application, it sadly is not an acceptable workaround for my users - who will also work on the app through remote desktop.
Its how it works in windows.
The reason is the that TS adapter cannot not be switched when session is started
so one must reconnect to allow accelerated gfx. It is not related to Qt at all.
There are very tools to overcome this and as alternative
https://sourceforge.net/projects/turbovnc/ can be used.
I do understand that Remote Desktop has problems with hardware accelerated OpenGL, but using the fallback software OpenGL 1.1 renderer should be possible I guess? That works in e.g. browsers.
Well it default fallbacks to OpenGL 1.1 Software (last time i checked)
but most 3D programs dont run (well) on that ancient version
so wont matter much.
I cant say if QWebEngine can use software rendering if it was enabled or
its simply not good enough :)