News for hackers. Stuff that matters.
Re:A lightweight, simple, fast, feature-filled, text editor ... by stephc_int13 on Tuesday December 27, 2022 @04:05PM (#34153781)
Last 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.

Re:A lightweight, simple, fast, feature-filled, text editor ... by tmtvl on Tuesday December 27, 2022 @04:19PM (#34153967)
But 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?
Re:A lightweight, simple, fast, feature-filled, text editor ... by krapp on Tuesday December 27, 2022 @05:10PM (#34154535)
SDL 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.
Re:A lightweight, simple, fast, feature-filled, text editor ... by aethy on Tuesday December 27, 2022 @05:12PM (#34154551)
It'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.
Re:A lightweight, simple, fast, feature-filled, text editor ... by stephc_int13 on Wednesday December 28, 2022 @05:19AM (#34159437)
In 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.
Re:A lightweight, simple, fast, feature-filled, text editor ... by vidarh on Tuesday December 27, 2022 @07:07PM (#34155699)
Software 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.