Hello, yesterday I officially released Louvre v1.0.0, a C++ library designed for building Wayland compositors with a primary focus on ease of development. It provides a default method for handling protocols, input events, and rendering, which you can selectively and progressively override as required, allowing you to see a functional compositor from day 1.

It supports multi-GPU setups, multi-session (TTY switching), and offers various rendering options, including a scene and view system that automatically repaints only the damaged (changing) regions during a frame. Because it uses multiple threads, it can maintain a high FPS rate with v-sync enabled when rendering complex scenarios. In contrast, single-threaded compositors often experience a rapid drop in FPS, for example, from 60 to 30 fps, due to “dead times” while waiting for a screen vblank, leading to the skipping of frames.

The library is freely available, open source, thoroughly documented, includes examples, and features a detailed tutorial.

You can find it here: https://github.com/CuarzoSoftware/Louvre

I hope it proves useful for you. If you decide to use it and encounter any doubts or wish to contribute to its development, please don’t hesitate to reach out.

Greetings!

  • @ehopperdietzelOP
    link
    6
    edit-2
    1 year ago

    Honestly, I haven’t explored Vulkan yet. I initially chose GLES 2.0 as the primary renderer to ensure compatibility with a wide range of hardware. Introducing Vulkan myself would be a time-consuming task unless I receive assistance.

    Regarding XWayland, Louvre doesn’t currently support it, so it’s naturally excluded. Well, it technically can run in rootful mode, but that is somewhat pointless. To enable independent window management, I believe I would need to create a mini X server, a task I haven’t tackled as of now.

    • @[email protected]
      link
      fedilink
      3
      edit-2
      1 year ago

      It looks very interesting.

      I might be wrong, but it seems to me like Vulkan Support in hw is better than opengl:

      • amd since at least Polaris (there is a project to Bring vulkan to really old terrascale graphics, but is jot yet there)
      • Intel since idk broadwell Skylake
      • Nvidia proprietary for sure don’t know since when and it seems that focus on nvk (new open source driver) is going to be on vulkan
      • android since version 7 - Eighty-five percent of active Android devices support Vulkan (this is better than android Version Rollout) https://developer.android.com/games/develop/use-vulkan
      • rpi, not sure which versions

      Probably all of them have better Vulkan than opengl drivers (due to drivers being simpler). David Arlie rather quickly implemented first Vulkan driver for AMD once Vulkan was first released. Just in case you need incentive.

      I was thinking of starting something similar as a learning exercise, but I’m really limited in time and not skilled as much in c++, so it would probably lead nowhere. Now I can just build on top - if I get any time for this, will come probably with questions.

      Anyway, this idea was to make something modern. Without the legacy crap. Actual goals were:

      1. Vulkan only (move gfx API Info the future)
      2. no x/xwayland (most of the apps in newer toolkits already support Wayland, the others I’d rather avoid)
      3. Multithreaded
      • @ehopperdietzelOP
        link
        31 year ago

        Interesting, I don’t recall where I read about Vulkan support still being experimental in many Mesa drivers; it might have been an outdated post. I’ll look into it, and perhaps I’ll decide to dive into learning Vulkan. Additionally, there are buffer-sharing mechanisms that already work smoothly with GLES, so I need to explore if the situation is similar for Vulkan. Thanks for your response, and if you have the time and inclination to help include it, feel free to do so! 😄