hi all,
I have nested “draw instructions” for my ui elements, they all use the same datatype.
Scenes and elements can be updated and changed during runtime.
<scenes>
<scene1>
<element1>
<element2>
</scene1>
<scene2>
<element1>
</scene2>
</scenes>
atm I feed this Spread of spreads into a giant loop, to draw the individual skia elements.
a scene manager sets which scenes are visible and what should be evaluated (green)
depending on the type of my element, the corresponding skia drawer is evaluated. (red)
(of course) this scales quite badly, and it seems to me this is the perfect place to use an interface.
I found no tutorials regarding vl interfaces. Is this the way to go, or can you recommend another programming paradigm to replace this construction?
imo the fastest way, would be to just have all visible elements running the loop. create the specific drawer before the element becomes visible, and destroy it afterwards. I did not start refactoring yet because I am not sure how the skia elements will behave regarding jittering when they are being created during runtime. the current patch runs pretty smooth.
all assets are already preloaded at the time and available as a datatype. but I also use video players from media foundation and hap in there. I already tried dissecting elementa, but this is a tad too complex for me.
Any tips appreciated!