nanovg
didact
nanovg | didact | |
---|---|---|
2 | 47 | |
27 | 6,002 | |
- | - | |
0.0 | 0.0 | |
almost 5 years ago | about 1 year ago | |
C | JavaScript | |
zlib License | - |
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
-
So you want to write a GUI framework
BGFX is a general-purpose 3D graphics engine, not a GUI nor vector graphics framework.
Nanovg is an awesome vector graphics library, but has limitations. (1) no ClearType, I fixed in my fork: https://github.com/Const-me/nanovg (2) The only way to get AA is hardware MSAA, unfortunately many popular platforms like Raspberry Pi don’t have good enough hardware to do it fast enough. Nanogui is built on top of Nanovg, shares the limitations.
I agree with the OP that Cairo and Skia are the only viable ones for Linux.
It’s sad because Windows has Direct2D for decades now (introduced in Vista), and unlike 2006, now in 2021 Linux actually has all the lower-level pieces to implement a comparable equivalent. Here’s a proof of concept: https://github.com/Const-me/Vrmac#vector-graphics-engine
-
2D Graphics on Modern GPU (2019)
> in your words, that "the quality is not good"
Oh, you were asking why I said so? Because I have clicked the “notes document” link in the article, the OP used the same tiger test image as me, and that document has a couple of screenshots. And these were the only screenshots I have found. Compare them to screenshots of the same vector image rendered by my library, and you’ll see why I noted about the quality.
> Vrmacs draws paths by decomposing them into triangles, rendering them with the GPU rasterizer, and antialiasing edges using screen-space derivatives in the fragment shader.
More or less, but (a) not always, thin lines are different. (b) that’s a high-level overview but there’re many important details on the lower levels. For instance, “screen-space derivatives of what?” is an interesting question, critically important for correct and uniform stroke widths. The meshes I’m building are rotation-agnostic, and to some extent (but not completely) they are resolution-agnostic too.
> and it is perfectly capable of rendering high-quality small text on the GPU
It is, but the performance overhead is massive, compared to GPU rasterizer rendering these triangles. For real-world vector graphics that doesn’t have too much stuff per pixel that complexity is not needed because triangle meshes are good enough already.
> it looks like it occupies a sweet spot similar to NanoVG
They’re similarities, I have copy-pasted a few text-related things from my fork of NanoVG: https://github.com/Const-me/nanovg/ However, Vrmac delivers much higher quality of 2D vector graphics (VAA, circular arcs, thin strokes, etc), is much faster (meshes are typically reused across frames), and is more compatible (GL support on Windows or OSX is not good, you want D3D or Metal respectively).
didact
-
"Build your own React" - Fiber tree
This post is part of my post series that complements the "Build your own React" tutorial by Rodrigo Pombo.
-
Understanding Tech: Looking Beyond the Surface
Learn how your framework works under the hood, even build your own clone of the framework.
-
Frontend fundamentals
It's a little outdated, but maybe will help https://pomb.us/build-your-own-react/
-
Ask HN: Could you show your personal blog here?
Most popular post https://pomb.us/build-your-own-react/
-
what ate some resources you'd recommend for learning JSX, aside from docs?
https://egghead.io/courses/the-beginner-s-guide-to-react https://kentcdodds.com/blog/what-is-jsx https://pomb.us/build-your-own-react/
- i made my own react
-
Draw SVG rope using JavaScript
Please make the SVG on the side of the viewport rather than on the top, it makes it difficult to read, since our screens are generally wider than they are tall. A similar effect is used on https://pomb.us/build-your-own-react/ if you wanted to take a look.
- GitHub - pomber/didact: A DIY guide to build your own React
- Why do we use "const" for useState instead of "let"?
-
What problems does React solve?
It simplifies things that would otherwise be extremely time-consuming doing with vanilla JS. At the end of the day, React is just some JavaScript code someone else wrote and we're just using it. You can create your own react/framework/library etc. if you want: https://pomb.us/build-your-own-react/
What are some alternatives?
vello - An experimental GPU compute-centric 2D renderer.
dnsguide - A guide to writing a DNS Server from scratch in Rust
bgfx - Cross-platform, graphics API agnostic, "Bring Your Own Engine/Framework" style rendering library.
codehike - Marvellous code walkthroughs
libGDX - Desktop/Android/HTML5/iOS Java game development framework
the-super-tiny-compiler - :snowman: Possibly the smallest compiler ever
msdfgen - Multi-channel signed distance field generator
react-redux-links - Curated tutorial and resource links I've collected on React, Redux, ES6, and more
ds_cinder - An application framework built on Cinder
overreacted.io - Personal blog by Dan Abramov.
nanovg - Antialiased 2D vector drawing library on top of OpenGL for UI and visualizations.
ish - Linux shell for iOS