Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Not well-versed in graphics libraries, but - isn't this reinventing the wheel? I mean, aren't there several others C GUI libraries/toolkits already?


This for MCUs and low powered devices with barely any memory. 32kb of ram and 128kb of flash memory requirement (and some extra space for rendering buffer and framebuffer). Even this is not an insignificant amount for various MCUs.


Which ones do you have in mind?

This is a very low level embedded GUI library when you have a screen where you just set pixel colors or can draw some primitives like lines.

This is not something you would use to program a GUI program running in a real desktop OS.


> This is not something you would use to program a GUI program running in a real desktop OS

But you still could in a framebuffer (actual on linux or emulated). This makes a lvgl GUI a cross platform experience from embedded to web to desktop...you could just make one GUI for your thermostat's physical display which could also be the same GUI you use when accessing it over the network via an emscripten webpage.


The main alternative to LVGL seems to be TouchGFX[1], at least that's the one I've seen mentioned the most in conversations around UI libraries for microcontrollers.

As you wrote these aren't made for desktop apps, but you can use desktop apps to help with UI development using these libraries.

For LVGL there's SquareLine Studio[2], I used it a few years ago and it was helpful. For TouchGFX there's TouchGFXDesigner[3], I haven't used it myself and it seems to run only on Windows.

[1] https://touchgfx.com/

[1] https://squareline.io/

[2] https://www.st.com/en/development-tools/touchgfxdesigner.htm...


> This is not something you would use to program a GUI program running in a real desktop OS

Indeed. In addition to that, I think that library is less than ideal for chips with an integrated 3D graphics hardware, like ARM Mali. Except applications with very low-resolution screens way below 1 megapixel, in which case CPU software rendering should be fine.


For what it's worth, I've used it on a real "desktop os" albeit on the framebuffer to make a couple full screen (1900x1200 resolution) applications and it worked really well. Biggest issue is lack of native support for multiple mouse buttons, but it was easy to hack that in myself.

You can run it under sdl in a regular windowing desktop environment too, but as stated, that's really not what it's best suited for. It's really meant for the small embedded stuff, for which I personally think it's excellent.

I also thought they were trying to make it capable of talking advantage of some of the accelerated graphics capabilities on some of the small/embedded boards (nxp maybe?), but it's been a while since I was paying attention and I'd have to dig through the GitHub issues/posts again.


> This is a very low level embedded GUI library when you have a screen where you just set pixel colors or can draw some primitives like lines.

There are a few of those like Dear ImGui that are pretty mature and time-tested


For really low powered stuff there's basically this and Adafruit GFX and some monochrome libs




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: