K
K
Kalombyr2020-01-04 18:17:00
linux
Kalombyr, 2020-01-04 18:17:00

Is it possible to use OpenGL in linux server and draw on the screen directly?

Greetings!
Installed for experiments ubuntu server 19.10 (you can use any other distro)
I want to use OpenGL directly (basically) without X, what would be displayed on the screen.
Tell me what is needed for this?
glxinfo issues "unable to open display" Tell me
, please, where to dig at least ... So far, in complete confusion.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Maxim Moseychuk, 2020-01-15
@Kalombyr

Facepalm

Ой, собрались специалисты тут местные.
Рональд Макдональд как обычно пытается лезть туда, в чем не разбирается совершенно.
Of course you can without X and Wayland. If you turn on your head a little, you can understand that X and Wayland somehow draw on the screen themselves, but they don't use themselves.
The modern way is to use KMS / DRM (on top of which the newfangled Weiland just works)
An example of a cube without X https://gitlab.freedesktop.org/mesa/kmscube/
If you are using the nvidia driver, then you need to pass the `nvidia-drm parameter to the kernel. modeset=1`. It is not necessary to put nvidia modules into the initramfs, as advised, for example, in the arch wiki. My driver version is now 440.44, and the kernel parameter is enough.
Please note that you should not be running X, Wayland or any software that will block /dev/dri/card0
Food for thought https://doc.qt.io/qt-5/embedded-linux.html

V
Vlad Poltorakov, 2020-01-06
@itxor

OpenGL is a set of APIs that allow you to map calculations from the GPU to X's. You can't do this without X's. As they said in the comments - there is pseudo-graphics, primitives will be in buffers, but this is not a solution to the problem, judging by the condition.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question