Announcement

Collapse
No announcement yet.

The Current State & Future Of GTK's New Unified Renderers

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • The Current State & Future Of GTK's New Unified Renderers

    Phoronix: The Current State & Future Of GTK's New Unified Renderers

    GTK recently merged their new "unified" rendering code with a focus on Vulkan API support and where Linux distributions are now encouraged to build with the Vulkan renderer. Prominent GTK developer Mathias Clasen at Red Hat has written more over the weekend about the state and future of the new Vulkan and NGL renderers...

    Phoronix, Linux Hardware Reviews, Linux hardware benchmarks, Linux server benchmarks, Linux benchmarking, Desktop Linux, Linux performance, Open Source graphics, Linux How To, Ubuntu benchmarks, Ubuntu hardware, Phoronix Test Suite

  • #2
    I wish there would be a modern book about GTK3 and GTK4 programming with Rust or Python

    all the books on amazon and ebay is only about GTK2 and programm GTK2 with C.

    GTK2 is really end of lifetime with the last projects like GIMP move to GTK3 or GTK4.

    it is same with Flatpak there is litterally no book for writing modern linux GTK4 Flatpak apps.
    Phantom circuit Sequence Reducer Dyslexia

    Comment


    • #3
      if you want to use rust you'd probably be better off with a rust toolkit than GTK which is a C toolkit. (although it has bindings for many languages)

      Comment


      • #4
        Linux distributions are now encouraged to build with the Vulkan renderer
        [...]
        The new rendering code isn't yet faster than the old OpenGL renderer
        Of course GNOME team is doing that...

        Comment


        • #5
          Originally posted by qarium View Post
          I wish there would be a modern book about GTK3 and GTK4 programming with Rust or Python

          all the books on amazon and ebay is only about GTK2 and programm GTK2 with C.

          GTK2 is really end of lifetime with the last projects like GIMP move to GTK3 or GTK4.

          it is same with Flatpak there is litterally no book for writing modern linux GTK4 Flatpak apps.
          It is quite easy to code GTK 4 in Python or Rust without any books.
          Mostly you can just look at the GTK API documentation.

          In Python you use GTK via GObject but unfortunately GObject does not have support for type hinting.
          If you GNOME Builder, which is a IDE then it has project templates for both Python and Rust as well as Flatpak support. There is also the gtk-rust-template which includes Flatpak support.

          Python with GTK works fine for smaller applications but as applications grow bigger and more complex it can get messy since there is no state management which makes it messy to update many things as the state of the application changes. Python has properties and so does GObject but GObject doesn't use Python's built-in properties. GTK uses GLib but the GLib main loop doesn't integrate with the Python's asyncio so using async libraries with your GTK applications is hell.

          The GTK Rust API have gotten better over time but GTK is a C library extended using GObject to provide object orientation and Rust is a language without structs and traits instead of classes, inheritance and interface so sometimes the API feels awkward and shoehorned and it relies some on Rust macros. It doesn't feel like idiomatic Rust. I have also experienced problems with the Rust bindings of libraries such as GtkSourceView and GNOME Tracker.
          Reference for Gtk-4.0

          Comment


          • #6
            Originally posted by keit99 View Post
            if you want to use rust you'd probably be better off with a rust toolkit than GTK which is a C toolkit. (although it has bindings for many languages)
            I can not use GTK3/4 with Rust ? is there a rust toolkit that is like GTK ?
            Phantom circuit Sequence Reducer Dyslexia

            Comment


            • #7
              Originally posted by keit99 View Post
              if you want to use rust you'd probably be better off with a rust toolkit than GTK which is a C toolkit. (although it has bindings for many languages)
              Relm is quite nice I've been told. The interface feels more "rust"-y than using gtk bindings directly.

              Comment


              • #8
                Originally posted by qarium View Post

                I can not use GTK3/4 with Rust ? is there a rust toolkit that is like GTK ?
                Iced is probably the most progressed. Xilem is interesting as well.

                Comment


                • #9
                  Originally posted by qarium View Post

                  I can not use GTK3/4 with Rust ? is there a rust toolkit that is like GTK ?
                  Yes you can. A bunch of GNOME apps are written in Rust for example.
                  Fractal (Matrix client) and the new Image Viewer being prime examples.

                  Comment


                  • #10
                    Originally posted by qarium View Post
                    I wish there would be a modern book about GTK3 and GTK4 programming with Rust or Python
                    Have you checked the official gtk-rs guide book?

                    Comment

                    Working...
                    X