use the z-index in the UI vertex shader and calculate it within the normalised vulkan range (0-1)
Otherwise very strange things happen.
Ramblings about hobbyist game development
use the z-index in the UI vertex shader and calculate it within the normalised vulkan range (0-1)
Otherwise very strange things happen.
make the container statehash also take its childrens statehashes into consideration (sic)
So far, the containers only calculated their own state hash.
– implement basic state hash calculation in widgets
– fix some size/position calculation bugs in code that was previously unused
– add some dummy buttons
As it says on the label. The mechanic to check the state hash was already in place, the actual calculation however did nothing so far, it is still pretty basic however. This is also the first time buttons are drawn:
– convert the Dimension and Position2Raw types to proper classes, not just aliases
– fix errors resulting from that
– fix up smaller problems that have been hiding in the code
– always draw the UI on top of everything else
We needs some custom logic in the Dimension/Position2Raw types, so they need to be proper classes themselves. This also adds the need for a fair amount of casts.
Get the first UI data on the screen, WiP all over
Finalising the UI integration on the renderer. 🙂
While not very impressive to look at, it means that the underlying concepts finally work!
fix model rendering. add texture id to the widget parameters
While adding an optional texture id to the widgets it does not do anything in terms of actually rendering it yet. It is also bringing up more of the rendering side of things, starting to account for the differences to the model manager, where we do not have concepts such as “models in models”, while “widgets in widgets” exist.
add a lot of boilerplate code to bring up widget drawing in the renderer. non-functional WiP.
Adds more code to connect the renderer with the more high level UI logic code.
– further flesh out the widget interface (and implementation)
– add a new (yet unused) UiPipeline to the renderer
– add an automated id assignment to the widgets
This adds the render pipeline for the UI, it is mostly copied over from the model pipeline, since there is the biggest logical overlap.
Also, the interface manager automatically counts up the number of instanciated widgets in order to assign them a unique id, similar to the models.
– add a concrete implementation for a simple container (that displays widgets in a rwo) (sic)
– add the minimal implementation of the UI manager (that only adds the empty bottom bar so far)
The newly introduced RowContainer is just a small implementation of the abstract container class. It does not do much, but draw its child elements in a row. Apart from that the concept of “padding” was introduced, so that child elements have some spacing in-between them.
To give everything a central place, the InterfaceManager was introduced, which itself implements the AbstractWidget class.
Since it is a widget itself, its children can calculate their size relative to it. For instance the newly introduced “bottom bar”, which will house most of the upcoming UI can be defined as follows:
slight refactoring of the widget constructors to make them easier to instantiate. added more setters to the abstract widget, so that we can have fewer required ctor parameters
As it says on the label!