Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Week 47/2013: Flares and kd-tree atlas, busy mode UI, ccache

edited 2013 Nov 25 in Developers
Last week work on the new GL2 lens flares progressed a little: there's a set of flare images in a texture atlas, and I can render one of them on screen for testing purposes.

A while back DaniJ mentioned that he had written a kd-tree based texture atlas a couple of years ago. I dug up the code and adapted it for use in our modern libgui. Compared to the basic row-based allocator we've had so far, this allows for more intelligent partitioning of the atlas's space. In practice, the atlas will fit more images, especially when their sizes vary. In addition to being used in the lens flare atlas, the new kd-tree allocator will also be used for the primary UI texture atlas, where most of the image data for the UI widgets comes from.

Ever since the introduction of the new UI framework, Doomsday's busy mode has been handled in an inelegant way. During busy mode, the entire UI was basically hidden and replaced with a secondary, simple UI that only shows a progress indicator. This is needlessly complicated and forcibly hides essential things like the taskbar, so I took the step of unifying the busy mode UI into the main UI widget tree. In practice, this means that transitions between busy and normal modes can be done more fluently, with fewer forced black screen transitions.

Busy mode has also been employing another crutch: in order to freeze the content of the game widgets and keep showing them during the long-running busy operation, the engine has been taking a screenshot of the complete window contents and drawing it back during busy mode. This is far from perfect, as the window contents may be influenced by post-processing effects or a VR transformation that shouldn't be replicated as-is, particularly since the window might reapply the effect to the captured screenshot.

To get around this issue, we are now rendering a "raw" copy of the game widgets into a texture, so that they can be redrawn later as they would appear without any effects applied. This will also allow applying shader effects to the background image during busy mode, which I plan to look into later.

Rendering to a texture is one of the new features provided by the GL2 classes in libgui. What we are now seeing are the first stages of incorporating GL2 into the old renderer pipeline. In the future, this integration will go deeper and deeper when we start tackling individual rendering subsystems.

In other news, I set up a new autobuilder VM for Ubuntu 13.10 (Saucy). The packages will appear in ppa:sjke/doomsday. Also, to make life easier for Unix people (like myself), Doomsday's project files now support the "deng_ccache" build option, which takes advantage of the ccache compiler cache. This greatly shortens the compilation time and reduces the friction of changing branches as one can rebuild the whole project much faster. Recently C++ has become the primary language of the project, and build times have grown longer as C++ tends to compile significantly slower than C. ccache alleviates this issue nicely, and helps the Unix autobuilders complete their task quicker. (Bad news for Windows, though: I'm not aware of any equivalent solution for MSVC.)

My plan for this week is to continue with the lens flares.
Sign In or Register to comment.