Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. WebGL and Remote Desktop
QtWS25 Last Chance

WebGL and Remote Desktop

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 2 Posters 4.0k Views
  • 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.
  • M Offline
    M Offline
    Mads D. K.
    wrote on last edited by
    #1

    Hi,

    I'm building an application using Qt for all business logic and heavy processing work, and JavaScript shown within a single WebEngine widget as the user interface. C++ and JavaScript communicates via a web channel and everything works just beautifully... except this one thing :)

    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:
    0_1517563393472_webgl-rdp-qt.png

    Does anyone know:

    1. If there is a workaround for this to get WebGL rendering working over a Remote Desktop connection in my Qt application, and
    2. If there are any plans to enable the fallback to the OpenGL 1.1 software renderer in the WebEngine views?

    Best regards,
    Mads

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      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"
      https://social.technet.microsoft.com/Forums/windowsserver/en-US/c8295ef8-3711-4576-9293-2c4965280165/opengl-and-remote-desktop?forum=winserverTS

      M 1 Reply Last reply
      0
      • mrjjM mrjj

        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"
        https://social.technet.microsoft.com/Forums/windowsserver/en-US/c8295ef8-3711-4576-9293-2c4965280165/opengl-and-remote-desktop?forum=winserverTS

        M Offline
        M Offline
        Mads D. K.
        wrote on last edited by
        #3

        @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.

        Best regards,
        Mads

        mrjjM 1 Reply Last reply
        0
        • M Mads D. K.

          @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.

          Best regards,
          Mads

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by mrjj
          #4

          @Mads-D.-K.

          Hi
          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.

          M 1 Reply Last reply
          0
          • mrjjM mrjj

            @Mads-D.-K.

            Hi
            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.

            M Offline
            M Offline
            Mads D. K.
            wrote on last edited by
            #5

            @mrjj
            Hello again,

            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.

            Best regards,
            Mads

            1 Reply Last reply
            0
            • mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Hi
              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 :)

              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