Remote off-screen rendering (Linux / no GUI)

北城以北 提交于 2019-12-08 08:06:00

问题


The situation is as follows: There is a remote Linux server (no GUI), which builds the OpenGL scene. Objective: Transfer generated image(s) to client windows machine I can not understand some thing with offscreen rendering, read a lot of literature, but still not well understood: Using GLUT implies setting variable DISPLAY. If I right understand means remote rendering via x11. If I run x11 server on windows (XWin server) machine everything works. If I try to run without rendering server , then : freeglut (. / WFWorkspace): failed to open display 'localhost: 11.0'. Anyway x11 is not suitable.

  1. Do I need to create a graphics context (hardware rendering support is required)?

  2. How can I create a graphics context on Linux server without GLUT/x11?

  3. Framebuffer object - whether it is suitable for my task and whether the graphics context is necessary for it?

  4. What is the most efficient way to solve this problem (rendering requires hardware support).

Not an important issue, but nevertheless:

  • Pixel buffer object. I plan to use it to increase the read performance of GPU memory. Is it profitable within my task?

回答1:


You need to modify your program to use OSMesa - it's a "null display" driver used by Mesa for software rendering. Consider this answer for near duplicate question as a starter:

https://stackoverflow.com/a/8442800/2702398

For a full example, you can check out the examples in the Mesa distribution itself, such as this: http://cgit.freedesktop.org/mesa/demos/tree/src/osdemos/osdemo.c

Update

It appears that VirtualGL (http://www.virtualgl.org) supports remote rendering of OpenGL/GLX protocol and serves rendered pixmaps to the client over VNC (whereupon, VNC head can be trivially made virtual).




回答2:


If you want to use full OpenGL spec, use X11 to create context. Here is a tutorial showing how you can do this: http://arrayfire.com/remote-off-screen-rendering-with-opengl/



来源:https://stackoverflow.com/questions/20366720/remote-off-screen-rendering-linux-no-gui

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