Showing off dynamic window resizing

I realized I haven’t posted it before, but actually the project has dynamic window resizing. I’ve had this feature for a long time (probably from the beginning of the project), but I don’t think I showed it before and it is not trivial to do.

Also, I had to add video support to the Hugo website/blog framework I am using so that it could show videos (the animated gifs were getting too big…).

Dynamic window resizing during execution

It ain't much but it's honest work.

Time spent for this Time spent so far
I don’t remember… 101 h

What happened is that, while I was figuring out how to support multiple viewports, I realized I could write the camera logic in a way that window dimensions changes could be handled instantly. So I did both. With this extra code, the input values the shaders are using to calculate what is on screen get updated according to the new viewport dimensions. The beauty of it is that it is transparent to the underlying shader code used for rendering. The camera / view / projection matrices get automatically recalculated, and this is then used in the shader code. So even later, when I will add more complex shader, this won’t be any added complexity.


Suggestions de lecture :