Questions about performance and babyblue theme
« on: 20 November 2016, 18:29:14 »
Hello! First of all, thanks for making this awesome software, it looks great :) I've got two questions.

1. I've noticed that every widget makes its own draw call. I'm hoping to support low end, integrated graphics chips. Can anyone give me a rough estimate of how many draw calls I have to work with, or is this a oversimplification of the issue? If so, the question becomes how many GUI elements can I have, assuming an even mix of buttons, ComboBoxes, and ListBoxes. Right now my game does a lot of finagling to draw everything in three calls, except for the GUI.

2. I've selected the BabyBlue theme, and I remember seeing somewhere an attribution "based on this:" with a link to a website which said it was a freebie, but did not include any sort of licensing information. Would it be risky to distribute this file with GPLd software? Should I just be careful how I phrase the licensing to be clear that it doesn't include this image?

*

texus

  • *****
  • 1161
    • View Profile
    • Texus's Blog
Re: Questions about performance and babyblue theme
« Reply #1 on: 20 November 2016, 18:50:59 »
Since it is possible to have every texture in a separate file, tgui treats textures as separate. So there is no optimization on the amount of draw calls at all. A button will do 2 draws (background and text) and e.g. a list box will do one for the backround, one for each visible line and several for the scrollbar (arrows, background and thumb).
I know you can have hundreds or even a few thousands of widgets while still having a good framerate on a low end pc, but that is of course with just the gui and nothing else being executed while you of course will want most of the time spend in your own code. So you will have to experiment a bit yourself and see how much drawing widgets affects the performance. Just keep in mind that performance was never a main goal of tgui, some parts will be better optimized than others.

As far as I know the UI that it was based on is free to use for any purpose. I don't think you have to worry about putting it seperately in your license, I guess it is similar to including TGUI and SFML: these parts are still under their original license while your project as a whole is GPL.
« Last Edit: 20 November 2016, 18:54:15 by texus »

Re: Questions about performance and babyblue theme
« Reply #2 on: 20 November 2016, 19:49:59 »
Perfect! Designing with that limitation shouldn't be a problem for me. Thanks much :)