HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
memononen
nanovg
C2015–2025
memononen / nanovg

nanovg

Antialiased 2D vector drawing library on top of OpenGL for UI and visualizations.

11Distinct people
15Mentions
0Explicit recommenders
5.7KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Antialiased 2D vector drawing library on top of OpenGL for UI and visualizations.

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:56:07 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year15 dated mentions

Observed mentions: 2015-10-30 10:04:12 UTC to 2025-10-07 05:30:56 UTC.

012342015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20152016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 4 mentions; 1 submissions, 3 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments20202021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments2025

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC101
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC000
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC101
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC101
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC413
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC000
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC202
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC303
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC101
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC101
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC110

What Hacker News says

15 sources
not_woowoo·Oct 7, 2025Submission

Show HN: My first finished audio plugin. Minimal Bloat, Under 1000 LOC

... under 1000 LOC if you don't include dependencies, but those are minimal as well. I had experimented with plugin development a few years ago, but I only recently got the time to actively pursue it, and I just completed my first "fully finished" plugin. This plugin is admittedly a bit on the simpler side, but I'm hoping to pursue more ambitious stuff eventually. Plus, though this is simple, I'm not sure there's anything else quite like it; it's a comb filter where the delay taps smoothly interpolate in the time domain, and this leads to pitch/time bending of each delay tap individually. I have some audio examples here https://notwoowoo.github.io/plugins/ The source code is also available on GitHub https://github.com/NotWoowoo/honey-comb I wanted to avoid the bloat that comes with popular plugin frameworks like JUCE and IPlug, which I've
Read the rest
found to be overly complex with a lot of overhead. My past experiences with these led me to try a lighter approach: a very light library called CPLUG (https://github.com/Tremus/CPLUG), glfw (https://github.com/glfw/glfw) for window management, and nanovg (https://github.com/memononen/nanovg) for graphics. I'm really curious to hear thoughts from musicians, plugin devs, or other DSP-related) developers. I've been working in this space in relative isolation, and I'm sure there's a lot for others to shed light on.
1 points · Open discussion
Didn't know about Skia previously! Thank you for the excellent suggestion! So, let's provide some links: Overview: https://en.wikipedia.org/wiki/Skia_Graphics_Engine Homepage: https://skia.org/ Source: https://skia.googlesource.com/skia/ (or) https://github.com/google/skia Also -- there's this old HN post: https://news.ycombinator.com/item?id=28143972 where the following github projects which involve drawing are mentioned: https://github.com/bkaradzic/bgfx https://github.com/memononen/nanovg https://github.com/wjakob/nanogui In the following article: https://www.cmyr.net/blog/gui-framework-ingredients.html we find the following interesting quote: >"These APIs exist, in subtly different form, on the various platforms. on macOS, there is CoreGraphics [Quartz 2D], on windows Direct2D, and on linux there is Cairo. One approach, then, is to p
Read the rest
resent a common API abstraction over top of these platform APIs, puttying over the rough edges and filling in the gaps. (This is the approach we have currently taken, with the piet library.)" So, some more quick links: https://en.wikipedia.org/wiki/Direct2D https://en.wikipedia.org/wiki/Quartz_(graphics_layer) Piet: https://docs.rs/piet/latest/piet/ https://github.com/linebender/piet Related: 2018 Paper: "A Proposal to Add 2D Graphics Rendering and Display to C++": https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p02...
In Cairo – Open-Source 2D Graphics Layer/API with font support and many back-ends
> to learn the 'nuts and bolts' of rendering These nuts and bolts are very different between CPU and GPU. CPU-based libraries are painting pixels in bitmaps in system memory. Most GPU-based libraries are uploading indexed triangle meshes, and rendering them with weird shaders. Worse, there're no good open source implementations of GPU-based ones. Microsoft ships an implementation as a part of OS (Direct2D) but it's not open source. Linux simply doesn't have an equivalent. At least for initial versions, consider C interop with this https://github.com/memononen/nanovg It cuts a few corners (no cleartype for text, CPU overhead for repeated rendering of same static paths) but it's still good overall, simple, and easy to use. > My only concern with C# is the cross compatibility Works well on Linux, Windows and OSX, including ARM CPUs. Not sure
Read the rest
about Android and iOS, never tested. My largest concern with C# would be performance. Technically the language allows to code in any style, but most guides and examples are using OO-heavy one. Less than ideal for performance-critical pieces where you'd want cache-friendly RAM layout i.e. mostly value types, minimize dynamic memory allocations (e.g. lambdas are using managed heap when created), and so on. My largest concern with the project overall would be the scale. Browsers are incredibly complicated. In C# the standard library contains many important pieces (HTTP stack, WebSockets, XML, etc.), you'll definitely find good free libraries to deal with HTML and CSS, you'll probably find libraries to interpret or JIT-compile JavaScript, but still, the remaining pieces are huge.
In Ask HN: Modern Alternatives to C
> the same UI definitions on any platform Very nice library! But you only support PCs. You have same structure, and same UX (mouse+keyboard, relatively large screen) on all of them, you only need to adjust for DPI scaling, and for window resize. About hardcoded pixel sizes, sometimes they’re OK. Apple did that in iOS, worked well for them. When they released iPhone 4, they just doubled the DPI. And when they released iPad, they made developers replace complete views and it made sense because it was much different UX. I’m not saying that library is good. Apple has separate UI markup language, and they have decent UI designer in XCode for that. The feature is IMO required for a modern GUI framework and it’s missing in Nana. Also, GPU-based rendering is nice to have nowadays, see MS XAML or Google Flutter. I once needed to create rich GUI fo
Read the rest
r embedded Linux app on top of essentially raw hardware, drm, kms, gles. I’ve compiled C shared library exposing some wrappers around NanoVG API https://github.com/memononen/nanovg then implemented touchscreen input, controls, styles and animations in C# using .NET core. Worked well for my requirements.
In Nana: A modern C++ GUI library
Depends on the complexity of the GUI you need and on other factors. QT is OK if your GUI is very complex and you're targeting a desktop OS. For simple GUI QT is just too big. For GUIs without a desktop OS (mobile, embedded), QT is not a good fit either, not enough mobile support, and their embedded license can be prohibitively expensive. I have positive experience building moderately complex commercial quality GUIs on top of this: https://github.com/memononen/nanovg
In A Go Custom Flutter Engine Embedder for Desktop
> Something that could offer similar usability in C definitely sounds exciting For painting, I have positive experience with this cross-platform C library: https://github.com/memononen/nanovg It’s tiny, has very few dependencies, and the performance is good even on relatively slow hardware like Broadcom or Mali embedded GPUs. However, it lacks higher level stuff. There’s no layout, input handling, styles, controls, advanced typesetting, or animations.
In LCUI – A small C library for building user interfaces with XML and CSS
> Does anyone know about text/vector rendering in webgl? There's three commonly used methods for this: 1) Tesselate your vector shapes to triangles. This is quite tricky to get right if you have concave polygons with holes in them. You can try to find the old GLU tesselator source and port that. 2) Use the stencil-then-cover trick, which is somewhat similar to stencil shadow volumes but in 2D. This is what the nanovg [0] library does (also NV_path_rendering). 3) Use signed distance fields, which is the best way to get good looking text/vector art if you project that into a 3d surface. You either need to pre-process your vector shapes into 2d distance field textures off-line or build a custom tesselator w/ a pixel shader that does this. WebGL is not special in this, the same tricks apply as normal OpenGL (ES). [0] https://github.com/memono
Read the rest
In Show HN: Vertexshaderart.com

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.