ddnet/src/engine/client
Robert Müller 75a368f552 Improve text rendering texture atlas utilization and performance
Replace skyline-based texture atlas algorithm with a rectangle packing algorithm that tracks empty atlas sections using `std::vector`s. The algorithm is very loosely inspired by https://github.com/TeamHypersomnia/rectpack2D.

Increases texture atlas utilization from ~70% to ~90-94%, i.e. less space in the atlas is unused.

Decreases the computational time to find suitable free regions in the atlas by factor 40x-164x (depending on atlas dimension and utilization). In absolute numbers, the computational time necessary for a glyph being added to the atlas is decreased from 0.0556ms-0.4679ms to 0.0013ms-0.0051ms (depending on atlas dimension and utilization).

The memory usage for the texture atlas algorithm increases from a maximum of ~128 KB to a maximum of ~3 MB.
2023-08-05 22:28:53 +02:00
..
backend Use size_t more in engine graphics 2023-07-20 21:58:17 +02:00
backend_sdl.cpp Add IGraphics::GetScreenName 2023-06-08 12:52:34 +02:00
backend_sdl.h Add IGraphics::GetScreenName 2023-06-08 12:52:34 +02:00
blocklist_driver.cpp Huge variable naming format 2022-07-08 18:01:29 +02:00
blocklist_driver.h Add Intel as vendor to the block list on windows 2021-05-06 12:23:40 +02:00
checksum.h Add some checksum functions to the client 2022-01-31 21:31:26 +01:00
client.cpp Merge pull request #6952 from Robyt3/TextRender-Font-Index-File 2023-08-05 15:49:12 +00:00
client.h Merge pull request #6952 from Robyt3/TextRender-Font-Index-File 2023-08-05 15:49:12 +00:00
demoedit.cpp Port some code to str_copy() template 2022-07-09 19:40:58 +03:00
demoedit.h Mark virtual function as override using a script: 2022-05-17 23:47:32 +02:00
discord.cpp Only announce servers using Steam/Discord integration which are registered 2022-10-09 16:16:54 +02:00
favorites.cpp Fix windows build 2022-09-27 13:45:58 +02:00
friends.cpp Add templated str_append function for arrays with fixed size 2023-06-14 00:04:01 +02:00
friends.h Organize engine-client includes 2022-06-17 17:46:43 +02:00
ghost.cpp Use sizeof(int32_t) instead of 4 2023-02-11 13:59:08 +01:00
ghost.h Use sizeof(int32_t) instead of 4 2023-02-11 13:59:08 +01:00
graphics_defines.h Replace all usages of C standard headers with C++ headers 2023-03-01 19:26:51 +01:00
graphics_threaded.cpp Remove inverted round rectangle corner drawing 2023-07-27 23:29:37 +02:00
graphics_threaded.h Use size_t more in engine graphics 2023-07-20 21:58:17 +02:00
input.cpp Use dropdown menu to select game controller 2023-06-09 14:04:35 +02:00
input.h Use dropdown menu to select game controller 2023-06-09 14:04:35 +02:00
keynames.h Regenerate key lists with latest SDL version 2023-05-30 23:39:47 +02:00
notifications.cpp Emscripten support 2022-03-25 12:42:18 +01:00
notifications.h Libnotify support for linux client (#2099) 2020-04-14 17:53:53 +02:00
serverbrowser.cpp Ensure proper buffer size is used with DDNet server filter 2023-06-14 00:04:01 +02:00
serverbrowser.h Ensure proper buffer size is used with DDNet server filter 2023-06-14 00:04:01 +02:00
serverbrowser_http.cpp Support master server address format in client 2023-08-04 12:32:02 +02:00
serverbrowser_http.h Allow multiple addresses per server in the serverbrowser 2022-07-10 16:52:07 +02:00
serverbrowser_ping_cache.cpp Allow multiple addresses per server in the serverbrowser 2022-07-10 16:52:07 +02:00
serverbrowser_ping_cache.h Allow multiple addresses per server in the serverbrowser 2022-07-10 16:52:07 +02:00
sound.cpp CSound: Initialize all members (fixes #6795) 2023-07-01 19:50:20 +02:00
sound.h CSound: Initialize all members (fixes #6795) 2023-07-01 19:50:20 +02:00
sqlite.cpp Make use of IO_MAX_PATH_LENGTH 2021-09-13 12:14:50 +02:00
steam.cpp Only announce servers using Steam/Discord integration which are registered 2022-10-09 16:16:54 +02:00
text.cpp Improve text rendering texture atlas utilization and performance 2023-08-05 22:28:53 +02:00
updater.cpp Add templated str_append function for arrays with fixed size 2023-06-14 00:04:01 +02:00
updater.h Use nullptr in generated and editor 2022-06-13 18:28:13 +02:00
video.cpp Fix deprecation warning in ffmpeg 6 (fixes #6398) 2023-03-10 14:38:37 +01:00
video.h Huge variable naming format 2022-07-08 18:01:29 +02:00