About TGUI 0.9-dev

Started by billarhos, 19 May 2019, 08:46:14

billarhos

Hi Texus. Read in facebook about TGUI 0.9-dev and batching rendering. This is awsome!

In your post:
Quote
In release mode, TGUI 0.8 takes 0.25 seconds to render it while TGUI 0.9-dev reduces this to just 0.08 seconds (on a laptop with intel graphics).

One quarter of a second is too much time to render those few widgets. May be you meaning milliseconds? I have never seen those times in all past and current tgui versions.

Will tgui 0.9 continue to work as it is now? Will this be configurable, meaning select the way tgui renders?

What happens in future if tgui texts have outline color?




texus

QuoteMay be you meaning milliseconds?
You are right, it should have been milliseconds (I edited the post now). That's what you get when quickly writing a post at the end of the day.

QuoteWhat happens in future if tgui texts have outline color?
In order to batch texts, I couldn't use the sf::Text class and had to implement what sf::Text does in my code. I removed things related to outline because it couldn't be set anyway, but I could add it back when support gets added (and it won't interfere with the batching as it is rendered together with the text). I'm still not sure how to give more control in rendering, this is one of the outstanding issues that I want to solve in TGUI 0.9.

QuoteWill this be configurable, meaning select the way tgui renders?
I'm not sure how the relation between widget and renderer will eventually look like. Maybe it will end up being the same as now but with the drawing code split in multiple functions inside the renderer, so that you just have to inherit the renderer and override one function to draw slightly differently. I've been too busy with the batch renderer until now to look into the other parts of the code that needs changing. And the batch renderer still needs some finishing touches before I can start on other parts of the code.

billarhos

What about considering using bitmap font rendering and may be using signed distance field (SDF) technique?

texus

The renderer that I provide (not to be confused with widget renderers) will continue to use SFML for rendering, so it is unlikely that I will add any features not supported by SFML myself. I will of course open for pull requests if someone can add extra functionality.

It may also be possible to completely swap out the rendering code in the future and replace it with your own code, but at this point I can neither confirm nor deny the existence or nonexistence of a Backends/SFML/BackendRendererSFML.cpp file that would contain all actual rendering code.

texus

QuoteWhat happens in future if tgui texts have outline color?
In what kind of situation do you want support for text outline? Maybe it should only be supported in Label to start with?

billarhos

Yes labels, definitely labels for most people. But if you ask me i said buttons.

In photo you can see my labels and buttons all using outline on texts. In my code i support outline color and outline size as well
In my project i use tgui only for settings (a lot of pages) and not for the game itself.

But generally text outline would give every widget the artist tune


texus

I was already thinking about doing it for buttons as well.

Adding an outline for all text rendering in TGUI 0.9-dev might not be that hard as long as all texts within the widget use the same outline thickness and color. I'm not looking forward to adding functions to change the outline for each widget state (e.g. different outline for button hover, down and focus states). I actually asked the question because I started adding it to Button and found that it would take quite a while to do that for all widgets.

billarhos

If you really want the absolute buttons, do not hesitate to ask me.
I am creating game buttons (directX opengl) for more than 18 years,
having all kind of controls like keyboard, touch, mouse, external electronic devices (www.heber.co.uk)

But now i am going to play music as DJ in a Greek bar (Thessaloniki Greece). I know i am old (47) but what the fcuk, a hobby is a hobby.
I see you tomorrow.

texus

Quotethe absolute buttons
What did you mean with this part exactly?
Any help to improve TGUI is always welcome, although the look of only buttons isn't going to have much value if the rest of the gui looks completely different.

billarhos

Perhaps i should used a better expression instead of absolute. I didn't have in my any vodka since i drink tequila. I meant more control in look and in functionality. I can't see how my prospective will affect them over the other widgets since all widgets have some default view. But let me open a new thread where i can explain in details.