off-screen rendering with GPU support BUT without windowing support
Asked Answered
A

1

0

Currently I am using OSMesa for off-screen rendering. I am running it on linux (RHEL) command line interface. It works really well but rendering consumes a lot of time. Basically i run opengl animation off-screen and capture frames on the fly and create a video using ffmpeg. So, my question is, whether it is possible to use GPU for off-screen rendering in order to make rendering process faster. I know i can use FBOs but i think they require window support which i dont have due to linux CLI. So in short, is there anyway to use FBOs in my case or what is the best solution to speed up the rendering process?

As answered 24/7, 2016 at 7:59 Comment(0)
K
1

So, my question is, whether it is possible to use GPU for off-screen rendering in order to make rendering process faster.

In principle yes, but so far no standard API on how to do it was settled down for. If you're using NVidia GPUs you can use headless EGL with the Nvidia proprietary drivers: https://devblogs.nvidia.com/parallelforall/egl-eye-opengl-visualization-without-x-server/

Using Kernel DRM and the Mesa OpenGL drivers it is possible to configure and operate the GPU in a single process without a display server. There's a demo called "kmscube", I forked it into my GitHub and made a few small modifications to it: https://github.com/datenwolf/kmscube In the current state kmscube will draw to the screen, but it should be possible to change the selection of a connector in a way, that you get full offscreen rendering.

Also the whole Wayland infrastructure is centered around the possibility to give clients arbitrary framebuffers to render to, that compositors then combine, so looking at the way how Wayland compositors allocate the off-screen framebuffers for Wayland clients to use is also worth looking at.

Kurgan answered 24/7, 2016 at 9:13 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.