I’m on Fedora 40, which is currently shipping GTK 4.14.5. Running GSK_RENDERER=help gtk4-demo
tells me that I have the new renderers available to me:
$ GSK_RENDERER=help gtk4-demo
Supported arguments for GSK_RENDERER environment variable:
broadway - Use the Broadway specific renderer
cairo - Use the Cairo fallback renderer
opengl - Use the OpenGL renderer
gl - Use the OpenGL renderer
ngl - Use the new OpenGL renderer
vulkan - Use the Vulkan renderer
help - Print this help
Other arguments will cause a warning and be ignored.
If I run GSK_RENDERER=ngl gtk4-demo --run=shadertoy
, I get a fairly performant OpenGL-rendered scene playing in the resulting application window. Launching the Gtk Inspector (Ctrl+Shift+d in the window once the demo is running) and going to the Global pane shows me that I am, indeed, taking advantage of the “GL (new)” renderer:
…If instead I run GSK_RENDERER=vulkan gtk4-demo --run=shadertoy
, I get a horrifically laggy demo running that tries to freeze my entire session and leads to “application not responding” popups until I off it.
This is hardly surprising, as my GPU is a several-years-old, bargain-basement Nvidia card, running the nouveau drivers… I wouldn’t be surprised if any Vulkan support is entirely software-emulated:
My system is not built for Vulkan. I accept that.
But if I run GSK_RENDERER=gl gtk4-demo --run=shadertoy
, I get a similarly-performant demo running to the ngl
mode. I can’t immediately tell the difference between the two, at least for that demo, in terms of performance/quality. But they both work, on my system. If that answers your question at all?
…Actually, I take it back. Running them side-by-side (which my system was also able to do, though it wasn’t happy about it), I could definitely see the improved antialiasing of the ngl
renderer. Most of the demo visuals are extremely “soft”/“fuzzy”, probably intentionally. (Hides a lot of rendering warts.) But the edge where that planet off in the distance meets the background sky, in that first demo, is a particularly good example of the improved antialiasing. It’s far less harsh and micro-jagged with the new renderer.