I just read “Google Continues Working On “Magma” For Mesa Cross-Platform System Call Interface” on Phoronix and didn’t get it. That made me realise my knowledge and understanding of these things is barely existent. I did write an MS paint clone on linux in C++ a really long time ago and the entire thing was with opengl (it looked like crap), but since then… nothing.

So my understanding is that the graphics card (or CPU if there’s no graphics card), writes to a component which is connected to a screen and every cycle (every 1/60 seconds if 60Hz) the contents are sent or read by the screen. OpenGL provided a common interface to do so, but has been outdated since… a while and replaced by Vulkan. Then there are libraries either built on top of are parallel to OpenGL. Vulkan can be parallel or use OpenGL if that’s the only one supported IIRC.
However, I’m not sure if OpenGL is implemented at the hardware level (on the graphics card), software level, or both.

Furthermore, I don’t understand where Magma, Meta, and MESA come in.

Maybe my core understanding is wrong or just outdated. I can’t tell. Can anybody eplain?

Anti Commercial-AI license

  • MonkderVierte@lemmy.zip
    link
    fedilink
    arrow-up
    3
    ·
    edit-2
    1 day ago

    Slightly related: there’s things like SDL_gui, which build directly on SDL2. But SDL is a library to interface media, kinda an abstraction. How… does that work?

    I know already about immediate vs. retained mode and that toolkits like Dear ImGui are more barebones (and often used in games), while kits like Qt/Slint have a Model/View pattern, have a data handling and/or messaging system.

    But above just doesn’t fit.

    Edit: apparently SDL handles draw calls too?

    • Redkey@programming.dev
      link
      fedilink
      arrow-up
      3
      ·
      edit-2
      19 hours ago

      In my (admittedly limited) experience, SDL/SDL2 is more of a general-purpose library for dealing with different operating systems, not for abstracting graphics APIs. While it does include a graphics abstraction layer for doing simple 2D graphics, many people use it to have the OS set up a window, process, and whatever other housekeeping is needed, and instantiate and attach a graphics surface to that window. Then they communicate with that graphics surface directly, using the appropriate graphics API rather than SDL. I’ve done it with OpenGL, but my impression is that using Vulkan is very similar.

      SDL_gui appears to sit on top of SDL/SDL2’s 2D graphics abstraction to draw custom interactive UI elements. I presume it also grabs input through SDL and runs the whole show, just outputting a queue of events for your program to process.