marciano wrote:
One thing I experienced is that the current overlay origin at the bottom left corner is quite unintuitive if you want to make (even simple) GUI elements which are usually drawn from top to bottom (e.g. a list). I'm thinking of changing the origin so that it is at the top left corner. Since you are currently writing a 2D app, what do you think?
Well, I don't mind it how it currently is... But in my dreams I would like the 2D rendering API to function exactly the same as the 3D one (i.e. a scene-graph of nodes). A regular camera node could set up the 2D frustum, and regular mesh/model nodes could represent the quads. Horde3DUtils could provide functions to generate geometry/etc from quads (and possibly other shapes!).
In my engine, I have actually implemented my own scene-graph on top of Horde3D::showOverlay!
I have Geometry nodes (calls Horde3D::showOverlay), Text nodes (calls Horde3DUtils::showText), group nodes and frustum nodes.
The frustum nodes push and pop 2D frustums on a stack, and the frustum on the top of the stack is used to transform all of the position inputs that are passed to showOverlay/showText.
This way, if I want the origin the be in the top-left corner, then I can just add a frustum node to my 2D scene...
marciano wrote:
Another thing that is needed is a color parameter for overlays. This would make it easy to get colored fonts.
This should just be a material uniform IMO.
marciano wrote:
Concerning the layer: 0 is certainly no good choice; either we expose it as parameter as you suggest or just put it on the highest layer since it is a debug element which should usually always be on top.
Yeah I just chose to put it on the top instead of changing the API because it is only called for one purpose (Debugging).
However, in my engine I don't actually use Horde's layer system at all! All elements are drawn on layer 0 - but I sort them myself so that they are layered properly (I was unable to sort the showFrameStats geometry, because my scene-graph doesn't have a "FrameStatsNode").