Skip to content

v0.5.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@nullgemm nullgemm released this 25 Mar 17:53
· 203 commits to master since this release

Well, this took longer than expected. It's been 4 months already, but at last we can celebrate the completion of all X11 backends with another tasty alpha release! This new version 0.5.0 brings you GLX, EGL, and even Vulkan! All the examples are functioning, in their simple and complex variant. Vulkan's was so heavy I chose to move most of the code in a separate helper source file, but for that price you get extensive debugging info on both your GPU and what's going on in the example itself.

The OpenGL backends (GLX and EGL) were pretty easy to implement, but I got stuck trying to make transparency work with GLX. Eventually I moved on with Vulkan, hoping implementing transparency for this backend would hint me into the right direction to fix it for GLX. This is indeed what happened, so now I can proudly say Globox supports creating transparent windows for GLX and Vulkan (you really have to see Plasma's background blur on GLX and Vulkan contexts to truly appreciate that).

Unfortunately, EGL does not support transparent contexts. This issue was reported on Mesa's bugtracker long ago, and a patch has even been worked on for several years now, but it seems we're still pretty far from having this problem resolved. We'll make sure to implement EGL transprency when it's supported though!

Because the Vulkan API already abstracts the display systems it supports to some extent, our Vulkan backend is shockingly empty, and was put together in just a few hours. However, the example we provide was not as easy to create. It took me 4 attempts to get it right and working, but in the end I think it has that intrinsic value I was searching for, being a clean self-contained Vulkan example in C99.

With X11 behind us, I can now focus on my next target: macOS. Unlike the previous versions of Globox, this iteration's macOS backends will be written in Objective-C. In the past I used C99 and the Objective-C runtime to hack AppKit and make all sorts of weird tests, but I don't think it is a good idea to follow this path. Now it is true I could use Swift, since it is clearly the future on Apple systems, and I think it is reasonable to suspect they might end up writing an entire operating system in that language out of pure faith at some point. However I can't make a choice based on what might be, in that regard, and currently macOS is still entirely written in Objective-C. Moreover, this language was created specifically to enable a unique vision of computing, and macOS was therefore designed around the principles and features Objective-C adds on top of C, so it is very hard to work without it when writing a low-level windowing library.

This will take some time since I have to actually learn Objective-C this time and implement a macOS backend for all the companion libraries used in the complex examples, but luckily the examples, especially the Vulkan one, should work with minimal changes (that's the whole point after all). However, since Vulkan and OpenGL are not supported by Apple, I will have to use metal implementations of these APIs, namely MoltenVK and MGL. This could take a while as well, but I expect the choice of using Objective-C to make it easier than it was for previous versions of Globox. Until then, enjoy good'ol X11 :P