GTK introduces two new renderers: one for GL and one for Vulkan

GTK

GTK logo

Recently, the GTK developers announced the addition of two new renderers: "ngl" and "vulkan", designed respectively for GL and Vulkan. Both rendererss are built from the same code base and follow the Vulkan APIs, making maintenance and upgrades easy.

Although they still do not surpass the old GL renderer in speed, These “unified” engines offer interesting new features such as antialiasing, fractional scaling, and support for dmabuf. Importantly, ngl has become the new default rendering engine in the recent 4.13.6 snapshot.

For those unfamiliar with GTK (formerly GIMP ToolKit and GTK+) you should know that this is a popular set of open source cross-platform software libraries for creating graphical user interfaces (GUIs). Originally developed for the needs of GIMP image processing software, GTK in particular is one of the most popular toolsets for the Wayland and X11 windowing systems.

About "ngl" and "vulkan"

The incorporation of these new renderers, "ngl" and "vulkan", marks a significant milestone in the development of GTK, The introduction of two new renderers highlights their ability to offer advanced functionality while maintaining compatibility with previous versions and is a testament to the community's commitment to continuous improvement and innovation in user interface development.

These new rendering engines are designed to take full advantage of the capabilities of the GL and Vulkan APIs, respectively, and offer a number of exciting improvements and features for users and developers alike.

One of the most notable features of these new renderers is that they share a common source, making them what are known as “unified renderers.” This means that They are built from the same code base, modeled to follow the Vulkan and GL APIs, and offer abstractions to cover the differences between the two. This unified approach not only makes it easier to upgrade and maintain, but also provides a solid foundation for future expansion.

The new rendering approach introduces a number of improvements and capabilities, including:

  • Improved Antialiasing: The new renderers address the problem of loss of fine details and jagged edges, especially in cases such as underlines and mnemonics.
  • Fractional Scale: Unified renderers more efficiently handle fractional scales, resulting in sharper images and fewer pixels.
  • Arbitrary Gradients: Support for gradients has been expanded with an unlimited number of color stops, improving the visual quality of designs.
  • Support for Dmabufs: The new renderers support creating dmabufs for textures via the render_texture API, expanding rendering capabilities.

While the new renderers offer numerous advantages, they also pose some challenges for application developers:

  • glshader nodes: The new renderers do not support all glshader nodes of the old GL renderer, which may require adjustments in some applications.
  • Fractional Positions: Fractional positions are now handled more precisely, which may require adjustments to certain layouts and graphics.
  • Controller Problems: Switching to new renderers may raise compatibility issues with some graphics drivers.

In addition to this, it is also mentioned that although the new renderers are not yet faster than the old GL renderer, they offer great potential for future improvements and expansions. Future versions are expected to address even more aspects of rendering, such as color management, glyph rendering, and performance on less powerful devices.

Finally, regarding future plans for the new renderers, it is mentioned that the following is on the table:

  • Proper color management (including HDR)
  • Route rendering on the GPU
  • Possibly including glyph representation
  • Rendering outside the main thread
  • Performance (on older, less powerful devices)

Finally, if you are interested in knowing more about it, you can consult the details in the following link.


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.