nanovg
imgui
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
nanovg
-
nanovg VS nitro-gl - a user suggested alternative
2 projects | 21 Aug 2023
- Cairo – Open-Source 2D Graphics Layer/API with Fonts and Many Back-Ends
-
2D graphics lib recommendation?
I use nanovg for my projects and it works surprisingly well for its size. It integration is pretty simple .... if you know a little bit of OpenGL, otherwise there is a slight learning curve.
-
minimax — minimalist 3D game engine in Clojure
The "engine" is built on top of amazing https://www.lwjgl.org/ and https://github.com/bkaradzic/bgfx/, and UI system is baked by https://github.com/memononen/nanovg and https://github.com/facebook/yoga
-
Randazzo: PMDG 737 Unstable with SU11 Beta.
It's a library for drawing vector shapes, sort of like SVG - https://github.com/memononen/nanovg The old way in the SDK was with GDI+, but the benefit of a vector format is scalability to higher resolutions and better GPU usage. The workaround potentially costs some frames, but its better than bust panels for now.
-
Simple 2D game
If you are a beginner in computer graphics, I strongly suggest you to look at the nanovg library: it contains all the primitives you might want to render (circles, lines, filled polygons, text, images, ...). Integrating it in existing codebase is not that hard, since the library is rather small.
-
W4 Games formed to strengthen Godot ecosystem
NanoVG is the closest thing I came across when I had a similar quesiton: https://github.com/memononen/NanoVG
unfortunately it doesn't seem like it's getting steady updates now unlike the last time I checked. But I imagine it's pretty mature at this point. There also seem to be ports in Metal/DX11 if you didn't want to be stuck in OpenGL.
-
Why are there so little Skia recources?
Also there's NanoVG if you really want a vector api in C, but don't need anti-aliased clipping.
-
Advice for the next dozen Rust GUIs
Getting sufficient antialiasing quality for 2D graphics is difficult on GPUs. https://github.com/memononen/nanovg accomplishes this with GL2/GLES2 level hardware for most of the stuff one would want to render as part of a GUI. My project https://github.com/styluslabs/nanovgXC supports rendering arbitrary paths with exact coverage antialiasing, but requires GLES3.1 or GL4 level hardware for reasonable performance.
-
Ask HN: Modern Alternatives to C
> 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 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.
imgui
-
Building cross-platform GUI apps in Rust using egui
The most well known immediate mode GUI framework, which egui is also inspired by, is Dear imgui. The egui repository also has a section on the trade offs when it comes to immediate mode GUIs, which I would definitely recommend you check out.
-
About the IMGUI Paradigm
> "Minimize state synchronization."
> void UpdateUI()
Minimize state synchronization by effectively synchronizing state on each screen refresh?
> "Minimize state storage on user side."
> Immediate mode is a style of API where important state is kept in user code
Then reduce state stored in user code by storing "important state" in user code?
> "Minimize setup and maintenance."
I don't find the example convincing. It seems like any more complexity beyond this toy example puts you right back where you started. Building components by hand is stone age ideology regardless of how you push state.
https://github.com/ocornut/imgui/blob/master/examples/exampl...
> "Easy to use to create dynamic UI which are the reflection of a dynamic data set."
Which is great for a video game.
-
Home to Anything JavaFX Related
A few JavaFX issues I've encountered while writing KeenWrite[1], my FOSS text editor based heavily on JavaFX:
* Building installer-free cross-platform binaries on a local Linux build machine requires an external packager[2].
* Good luck building an installer-free binary for CPU architectures that differ from the compiler's machine.
* Creating a Windows version will cost $ (to sign).
* Creating a macOS version will cost $ (to sign).
* WebView is a bloated beast that bundles JavaScript and exposes no API to set scrollbar positions.
* FlyingSaucer[3] is a lightweight alternative to WebView, but requires a SwingNode.
* SwingNodes are blurry on Windows.
* SwingNodes issue GDK-3 warnings on Linux.
* Menu latching messes up cross-platform (Alt+Tab is a wrench).
* Modular applications are a pain. Migration has been poorly communicated, poorly documented, and poorly supported.
* RichTextFX has no way of changing the caret style in insert mode.
* PreferencesFX, and likely other FX libraries, has security issues.
* For MDI with dockable panes, you'll need tiwulfx-dock[4].
Java problems:
* Write-once, run anywhere is no longer true.
* Apache Batik for rendering SVG images is buggy, EchoSVG[5] is better.
* Rendering math as SVG is hard[6].
* Cross-platform user data directory that complies with XDG, Windows, and macOS will take effort.
* Reliably locating executable programs cross-platform is a chore.
Depending on your requirements, C++ and imgui may be a better choice.[7]
[1]: https://gitlab.com/DaveJarvis/KeenWrite
[2]: https://github.com/Reisz/warp/
[3]: https://github.com/flyingsaucerproject/flyingsaucer
[4]: https://github.com/panemu/tiwulfx-dock
[5]: https://github.com/css4j/echosvg
[6]: https://gitlab.com/DaveJarvis/KeenType
[7]: https://github.com/ocornut/imgui/issues/4400#issuecomment-89...
- About the Imgui Paradigm
- 10 Years of Dear ImGui
-
Russ Cox is stepping down as the Go tech lead
> I switched from C++ to C about 7 years ago and never looked back
I'm definitely considering the same, and you're right - it's not C++ itself that appeals to me at all, it's the libraries. I'm not sure what C libraries I'd use for collections (instead of the STL and Abseil [0]), or in lieu of CLI11 [1] or Dear ImGui [2].
[0] https://abseil.io/about/design/swisstables
[1] https://github.com/CLIUtils/CLI11
[2] https://github.com/ocornut/imgui
-
So you think you know box shadows?
This discussion around adding shadows to window boarders in imgui is also interesting: https://github.com/ocornut/imgui/issues/1329
-
Plausible Community Edition
I think that world still exists. We're on HN, so there's always going to be a business/startup bias in what we talk about and share here. And doubly so if someone develops a product as open source with a commercial offering to support it from the get go.
Off the top of my head, Imgui[0] is an example of an open source project, widely used, developed by a small group with a main contributor. AssetCooker [1] is a project that I discovered recently which is clearly a passion project from a single developer who shared it with the world. CNCF [2] is an odd one, but in my mind it's a 21st century Apache foundation - they have a bunch of core projects which are complete open source projects, used widely in production and sustained through different models.
I think imgui (of the bunch) is probably closest to the GCC-of-the-early-90's idea.
[0] https://github.com/ocornut/imgui
[1] https://github.com/jlaumon/AssetCooker
[2] https://www.cncf.io/projects/
-
Writing GUI apps for Windows is painful
It's even worse.
> Those were only a few options that I considered. After a very long time trying out all sorts of different libraries and at one point even writing my own MFC styles, I figured out that for simple apps there is simply nothing better suited than Dear ImGui.
They decided to go with the option that deviates the most from the standard Windows UI because there are no native controls at all and it's a nightmare for accessibility (see https://github.com/ocornut/imgui/issues/4122). I use it for prototyping privately, but I'd never make anything I want to release into the world with it.
- Dear ImGui version v1.90.6 released
What are some alternatives?
Skia - Skia is a complete 2D graphic library for drawing Text, Geometries, and Images.
wxWidgets - Cross-Platform C++ GUI Library
DiligentEngine - A modern cross-platform low-level graphics library and rendering framework
nuklear - A single-header ANSI C immediate mode cross-platform GUI library
sokol - minimal cross-platform standalone C headers
NanoGUI - Minimalistic GUI library for OpenGL
MetalNanoVG - The Metal port of NanoVG.
GTK+ - Read-only mirror of https://gitlab.gnome.org/GNOME/gtk
raylib - A simple and easy-to-use library to enjoy videogames programming
egui - egui: an easy-to-use immediate mode GUI in Rust that runs on both web and native
bgfx - Cross-platform, graphics API agnostic, "Bring Your Own Engine/Framework" style rendering library.
CEGUI