https://github.com/commmrade/kemul
So I'm making a terminal emulator
And now I'm trying to optimize rendering and would like to get some advices about that
Right now only optimization I have is a texture atlas, where I store different kinds of symbols
Also, I'm gonna store symbols in a 2d vector of Cell structures soon, so I can store bg, fg color and etc.
Cell is gonna like like:
- uint32_t codepoint
- SDL_Color fg_color
- SDL_Color bg_color
- uint16_t flags (underlines, bold, etc) (bit flags)
Would love to hear some advices on how to optimize rendering of Cells as well.
std::vector<uint32_t> codepoints;
utf8::utf8to32(buffer.get_buffer()[i].cbegin(), buffer.get_buffer()[i].cend(), std::back_inserter(codepoints));
Right now I turn text into codepoints like this
But with Cells it's gonna be weird I think, I will have to extract codepoint out of Cell struct and I suppose it will affect performance, so how should I go about that?