Anyone I know have experience with DRI/DRM/KMS graphics programming?
I'm trying to find out how to render to the display (with hardware acceleration) without a running X or Wayland session – libdrm seems to be the thing I want to use, but I'm simply not finding *any* documentation on it and I'd be really grateful for anyone who can give me a proper overview and tell me how to instantiate a surface I can render to with cairo.
@yuki_is_bored Writing a wayland compositor (or multiple ones) is the goal. I still need to know how to do DRM rendering and If I'm not mistaken wayland itself has nothing to do with that.
Also, I was told about kmscube before, but it simply doesn't work on my system and getting it to work would require way more C know-how than I (want to) have, especially with its code being pretty much completely uncommented as well…
@yuki_is_bored I really get the feeling like this might not at all be hard to do but that low-level engineers just plain suck at documenting things… :F
@phryk Welcome to FreeDesktop!
Yeah, it's a giant turd, really. Stuff like these are just one of those things where you really have to read a bunch of source code and examples to understand the basic gist of things.
I suggest scouring through the Mesa source code for documentation (i.e. https://gitlab.freedesktop.org/mesa/mesa/-/blob/master/src/gbm/main/gbm.c#L127).
I finally found the thing that I've been looking for: https://web.archive.org/web/20200203213450/http://virtuousgeek.org/blog/index.php/jbarnes/2011/10/31/writing_stanalone_programs_with_egl_and_
Should be enough to get a 100 foot view.
I tried looking for an online prebuilt one but couldn't find any that's complete and up to date.
Though, all you need to do is get to the point where you get a EGL display (https://www.khronos.org/registry/EGL/sdk/docs/man/html/eglGetDisplay.xhtml) from there you can initialize OpenGL.
@phryk If you want Vulkan, I'm sorry, I'm not really familiar with Vulkan.
It seems Vulkan dropped EGL entirely, not sure how you can get Vulkan running just from opening the DRI device.
@yuki_is_bored Wow, thanks so much for all of that. My experience with and knowledge of C is pretty limited so I would've had an extremely bad time finding this information myself. 🤗
Server run by the main developers of the project It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!