Performance regression due to font rendering
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Armagetron Advanced |
New
|
Undecided
|
Unassigned |
Bug Description
Font rendering in 0.4 and trunk has introduced a huge performance regression compared to 0.2.8.
Our usage of FTGL could be improved:
• Restrict our font size usage to 1 or 2 sizes and scale before rendering. This will generate only 1 or 2 OpenGL textures compared to now where a new texture is generated for every font size.
• Minimize or cache GetWidth() calls that determine the width of a to-be-rendered string.
FTGL development seems to be dead but it could also use some optimizations, such as better glyph packing in the texture object. Currently FTGL creates a large texture object where glyphs are packed into a single row (ex: 8162px by 16px with a full-featured TrueType font).
We could also move to something like freetype-gl <https:/