5 ms·
What GUI Library does the editor use?
by symisc_devel 4y ago
What GUI Library does the editor use?
- kuon 4y agoA quick look at the source seems to indicate SDL and freetype.
- stephc_int13 4y agoLast time I looked it was simple software rendering on an SDL windows. As simple as it goes. I was impressed by how fast it was given that software rendering should be quite slow, but these days CPU are so powerful that this might not be a problem A simple OpenGL renderer could be added with minimal efforts I think.
- tmtvl 4y agoBut if OpenGL was used, wouldn't that have to go through Zink and MoltenVK for Apple? Or is there a Zink-like OpenGL wrapper for Metal?
- krapp 4y agoSDL will let you push geometry directly without needing OpenGL now with its geometry API, and I think all of its drawing functions use that by default now. I don't know if that's adequate compared to OpenGL but it isn't entirely CPU bound. Dear ImGUI's SDL renderer uses it.
- aethy 4y agoIt's a bit more complicated to add the OpenGL renderer, because of subpixel font rendering. You need to sample the framebuffer to do it correctly in all cases, as well as a custom shader. It's on the list of things to do, but as you say, CPUs are generally powerful enough these days; so it's not super high-priority at the moment.
- stephc_int13 4y agoIn most cases you should know the background color behind the text without sampling the buffer, or at least get an approximation or revert to grayscale AA when layering text on top of unknown background, but yeah I get the idea and it is an interesting trade off.
- vidarh 4y agoSoftware rendering for a text editor hasn't been a major bottleneck for a few decades, and while resolution has increased CPU speed has outpaced it.
- Kukumber 4y agohttps://github.com/rxi/microui https://github.com/rxi/microui the editor is a fork of: https://github.com/rxi/lite https://github.com/rxi/lite