#Improve rendering of symbols in my terminal emulator

12 messages · Page 1 of 1 (latest)

chilly void
#

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?

GitHub

Contribute to commmrade/kemul development by creating an account on GitHub.

cobalt ruinBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.

unkempt wing
#

outside of the obvious like this^, run a profiler and observe where the real bottlenecks are

chilly void
unkempt wing
#

oh and the <algorithm> header may cause you to run N deep copies of some heavy object you have, and thus crush your performance
like this guy:
https://www.youtube.com/watch?v=mOSirVeP5lo&pp=ygUVY2hlcm5vIEkgb3B0aW1pemVkIGl0

The first 1,000 people to use this link will get a 1 month free trial of Skillshare: https://skl.sh/thecherno12211

Patreon ► https://patreon.com/thecherno
Instagram ► https://instagram.com/thecherno

Twitter ► https://twitter.com/thecherno
Discord ► https://discord.gg/thecherno

Code ► https://github.com/valerioformato/RTIAW
Ray Traci...

▶ Play video
unkempt wing
chilly void
#

and on linux

unkempt wing
unkempt wing
#

kinda like gdb's cousin