Windows Remote上的OpenGL的当前状态和解决方案 [英] Current state and solutions for OpenGL over Windows Remote

查看:451
本文介绍了Windows Remote上的OpenGL的当前状态和解决方案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

解决方案取决于用例,答案分散在整个网络的深处. 我希望在开始研究此内容时,无论是编码人员还是非编码人员,都可以写这篇文章.

Solutions for this are dependent on the use case and answers are fragmented across the vast depths of the net. This is a write-up I wish existed when I started researching this, both for coders and non-coders.

Windows的RDP会话不会公开图形卡,至少不会直接公开图形卡.例如,您不能更改桌面分辨率,而GraphicsCard驱动程序通常仅禁用其设置菜单.因此,启动高于v1.1的OpenGL上下文失败.不幸的是,尤其是在支持IRC中,通常建议不要使用WindowsRemote.在许多公司环境中,Windows Remote是一个经常使用的工具,因此应用程序也必须在其中运行.

A RDP session of Windows does not expose the graphics card, at least not directly. For instance you cannot change the desktop resolution and GraphicsCard drivers usually just disable their setting menus. Starting a OpenGL context higher than v1.1 fails because of this. The, especially in support IRCs, often suggested "Don't use WindowsRemote" is unfortunately not an option for many. In many corporate environments Windows Remote is a constantly used tool and an app has to work there as well.

您可以启动OpenGL程序,使它可以查看图形卡,创建opengl上下文,然后通过WindowsRemote连接.这始终有效,因为Windows远程仅传输窗口内容.这可以通过以下方式完成:

You can start the OpenGL program, allowing it to see the graphics card, create an opengl context and then connect via WindowsRemote. This always works, as Windows remote just transfers the window content. This can be accomplished by:

  • 批处理脚本,它关闭会话并启动程序,使您可以连接到已经运行的程序. (来源)
  • 使用VNC或其他工具远程进入计算机,启动程序,然后切换到Windows Remote. (简单的VNC程序,也带有便携式客户端)
  • A batch script, that closes the session and starts the program, allowing you to connect to the program already running. (Source)
  • Using VNC or other to remote into the machine, start the program and then switch to Windows Remote. (Simple VNC programm, also with a portable client)

(仅适用于OpenGL ES)将OpenGL转换为DirectX. DirectX完全可以在Windows Remote下运行,甚至在出现故障时甚至可以在DX11中内置一个软件渲染回退.

(Only for OpenGL ES)Translate OpenGL to DirectX. DirectX works under Windows Remote flawselly and even has a Software rendering fallback built into DX11 if something fails.

  • 使用ANGLE Project在运行时执行此操作.这就是QT 官方建议的,以及Chrome和Firefox如何实现WebGL. ()
  • Use the ANGLE Project to do this at run-time. This is what QT officially suggests you do and how Chrome and Firefox implement WebGL. (Source)

切换到软件渲染作为回退.例如3dsMax之类的某些CAD软件就是这样做的:

Switch to software rendering as a fall back. Some CAD software like 3dsMax does this for instance:

  • 在SDL2下,您可以使用SDL_CreateSoftwareRenderer()
  • 在GLFW版本3.3下,将发布OSMesa(Mesa的屏幕外渲染),与此同时,您可以使用-DGLFW_USE_OSMESA = TRUE来构建Github版本,但我个人仍然很难使该版本运行()
  • Under SDL2 you can use SDL_CreateSoftwareRenderer (Source)
  • Under GLFW version 3.3 will release OSMesa (Mesa's off screen rendering), in the mean time you can build the Github version with -DGLFW_USE_OSMESA=TRUE, but I personally still struggle to get that running (Source)
  • Directly use Mesa's LLVM pipe for a fast OpenGL implementation. (Source)

其他:

  • 使用OpenGL 1.1:Windows具有OpenGL 1.1的内置实现,并且 较早.一些游戏引擎具有内置的功能,因此 在Windows Remote下工作.
  • 显然有一个中间件,即使在Windows Remote上也可以使用OpenGL 4,但这是一个较大的软件包的一部分,并且是一种商业解决方案. ()
  • Use OpenGL 1.1: Windows has a built in implementation of OpenGL 1.1 and earlier. Some game engines have a built in fall back to this and thus work under Windows Remote.
  • Apparently there is a middle-ware, that allows for even OpenGL 4 over Windows Remote, but it's part of a bigger package and is a commercial solution. (Source)

非常感谢其他解决方案或更正.

Any other solutions or corrections are greatly appreciated.

推荐答案

Windows远程桌面将打开一个远程会话.我认为,至少在NVIDIA方面,只有专业(Quadro)工作站卡的驱动程序才具有远程会话支持(尽管我自己从未测试过).根据我的经验,普通的GeForce驱动程序无法在远程会话中工作.那不仅影响OpenGL.据我所知,例如CUDA也无法在远程会话中使用.

Windows Remote Desktop will open a remote session. I think, at least when it comes to NVIDIA, only the drivers for professional (Quadro) workstation cards have remote session support (never tested this myself though). Normal GeForce drivers do not work in a remote session (in my experience). That not only affects OpenGL. As far as I remember, e.g., CUDA will also not work in a remote session.

就个人而言,如果您必须远程处理使用GPU的内容,我建议 TeamViewer VNC .他们可能需要更多的带宽,但是由于它们将仅是远程控制本地交互式会话而不是在远程会话中工作,因此一切都将像您坐在机器前一样工作.要注意的一件事是,使用TeamViewer/VNC当然会干扰实际上坐在计算机前的任何人……

Personally, if you have to work remotely on stuff that's using the GPU, I would recommend TeamViewer or VNC. They probably need more bandwidth, but since they will simply remote control the local interactive session rather than work in a remote session, everything will work just like it would if you were sitting in front of the machine. One thing to be aware of, is that using TeamViewer/VNC will, of course, interfere with anyone who is actually sitting in front of the machine…

这篇关于Windows Remote上的OpenGL的当前状态和解决方案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆