Seizer: Wayland application framework

Hi all, posting seizer here for its v0.2.0 release. It’s changed a lot since its initial conception, especially recently. However, what is the list of features as of now, copied from the README:

14 Likes

seizer 0.3.0 is released:

Thanks to @desttinghim for helping with some of the development.

There have been a lot of changes, but I want to highlight the new seizer.tvg.Flattened struct. It supports parsing (some) TinyVG files, which it converts into a list of Canvas draw commands. Previously seizer had some support for tvg files, but it relied on the TinyVG sdk to rasterize to a bitmap image. seizer.tvg.Flattened make drawing tvg files more efficient and elegant.

Here’s a screenshot of seizer.tvg.Flattened rendering a cursor in an unreleased project, seizer-solitaire:


By the way, @desttinghim and I are currently looking for programming jobs. If you know of any, we would be happy to hear from you. Otherwise, if you want to help the seizer project continue, consider donating at polar.sh/klaji:

6 Likes

You’ve arrived at quite a tasteful featureset.

  • Running statically linked binaries on Linux gives me dopamine.

Indeed… I’m suddenly starting to feel motivated to make little GUI utilities for myself and others since they can be easily distributed and kept around for the future with no hassle.

5 Likes

I’ve been working on improving the fill triangle command in seizer:

The first change I’m working on is increasing the performance. The initial implementation of filling triangles in seizer calculates the 3 edge functions that make up a triangle at every point within the triangles bounding box. This very slow! To speed this up, seizer now calculates what the delta value of the edge functions is. Because edge functions are linear, we can just add these delta values at every step in the bounding box rather than doing the full calculation. This dropped the time per frame for the “triangle filling” images from 137ms to 24ms. For the “triangle (large)” image, the difference was 91ms to 15 ms.

The second feature I was working on is anti-aliasing. If you look at the first set of images, you should see jagged pixels on the edge of each triangle (assuming the images weren’t resized :sweat_smile:). This can be okay if you’re looking to make a video game with a retro aesthetic, but usually this tends to look somewhat jarring. To avoid the jaggedness, I implemented a technique known as Multi Sampling Anti-Aliasing, or MSAA. Instead of checking just the center of each pixel to determine if the pixel is “covered” by the triangle, MSAA checks four different spots inside each pixel and determines if they are covered. The result is then averaged and the color multiplied by that average (NOTE: this only works because seizer stores pixels in linear sRGB color space with premultiplied alpha). The second set of images should show this, again assuming they weren’t resized.

Of course, doing all that extra work does have a cost. The frame time for the first image jumps from 24ms to 84ms, and the frame time for the second image jumps from 15ms to 55ms. Still faster than the naive approach!

1 Like