Of course, the sensible thing would be to use an existing game engine, but after a certain point, there is some curiosity if learning and fighting yet another game engine is really quicker that just writing something from scratch.
And then d3dx12 happened, and the buy in cost of complexity is a bit rough, but then again I possibly spent too much time with openglel, so anything other than that is going to be a pain point, but we move on.
None of the attached images are particularly technically impressive, just working through the checklist of [rbga triangle, triangles with texture, rendering to texture, updating shader constant buffer, rendering text to screen, basic layout of a stack of text elements] edit (not showing the rbga traingle and other really basic ouput in an attempt to not offend any of the non programmers or other people that find a rgb triangle offensive)
Though did finally get around to getting accurate word wrapping, and taking some care for everything to be vaguely pixel perfect, at least as much as un sharpened text will be.
Fun also includes making a dynamic text glyph atlas, including the ability to also insert icons. And making the basic ui system pool render targets, so using viewport and smaller areas of the texture, and making things only draw if inputs change, and automatic scrolling if the ui desired size of an element is bigger than the size provided by the arent container....
- Log in to post comments