How can I run an OpenGL application installed on a linux machine from my windows machine?

蹲街弑〆低调 提交于 2019-12-12 07:38:10

问题


In the spirit of being helpful, this is a problem I had and solved, so I will answer the question here.

Problem

I have:

An application that has to be installed on on Redhat or SuSE enterprise.

It has huge system requirements and requires OpenGL.

It is part of a suite of tools that need to operate together on one machine.

This application is used for a time intensive task in terms of man hours.

I don't want to sit in the server room working on this application.

So, the question came up... how do I run this application from a remote windows machine?

I'll outline my solution. Feel free to comment on alternatives. This solution should work for simpler environments as well. My case is somewhat extreme.


回答1:


Solution

I installed two pieces of software:

PuTTY

XMing-mesa The mesa part is important.

PuTTY configuration

Connection->Seconds Between Keepalives: 30
Connection->Enable TCP Keepalives: Yes

Connection->SSH->X11->Enable X11 forwarding: Yes
Connection->SSH->X11->X display location: localhost:0:0

Lauching

Run Xming which will put simply start a process and put an icon in your system tray. Launch putty, pointing to your linux box, with the above configuration. Run program

Hopefully, Success!




回答2:


If you want the OpenGL rendering to be performed on your local machine, using a Windows X server, like Xming is a good solution. However, if you want rendering to be done on the remote end with just images sent to the local machine, you want a specialized VNC system that can handle remote OpenGL rendering, like VirtualGL.




回答3:


You could also use VNC ( like cross platform remote desktop ) X is more efficent since it only sends draw commands rather than pixels, but if you are using opengl it is likely that most of the data is a rendered image anyway.

Another big advantage of VNC is that you can start the program locally on the server and then connect to it with VNC, drop the connection, reconnect from another machine etc without disturbing the main running program.




回答4:


For OpenGL, running an X server is definitely a better solution. Just make sure the application is developed to be networked. It should NOT use immediate mode for rendering and textures should be RARELY transferred.

Why is X server a better solution in this case (as opposed to VNC)? Because you get acceleration on workstation, while VNC'ed solution is usually not even accelerated on the mainframe. So as long as data is buffered on the X server (using vertex arrays, vertex buffer objects, texture objects, etc) you should get much higher speed than using VNC, especially with complex scenes since VNC has to analyze, transfer and decode them as pixels.



来源:https://stackoverflow.com/questions/106201/how-can-i-run-an-opengl-application-installed-on-a-linux-machine-from-my-windows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!