← Back

ofxBlend2D

github.com/Daandelange/ofxBlend2D · @Daandelange
OF 0.12 Graphics Bridges 2D Rendering

Lib Blend2D addon for OpenFrameworks : a blazing fast CPU 2D vector graphics renderer.

9 1 Last commit 5mo ago Created 2y ago

Forks

Forks pushed to more recently than Daandelange/ofxBlend2D itself, plus any admin-confirmed fork with commits of its own — worth checking if you're hitting issues with the original.

ofxyz/ofxBlend2D by @ofxyz · ★ 0 · pushed 5mo ago

README

ofxBlend2D



An OpenFrameworks addon integrating libBlend2D, a blazing fast CPU 2D vector graphics renderer powered by a JIT compiler.

Features: Technically:

When to use

OpenFrameworks has its own renderer pipelines, why use a different one ?!? I can think of multiple use cases, but generally this should be thought of as an additional renderer rather than the main renderer. Depending on your needs, ofxBlend2D can be faster to render than OpenFrameworks, for example when your draw commands exceed real-time rendering capabilities of your GPU. This is typically useful on computers with a poor GPU and a good multithreaded CPU, or submitting lots of real-time (2d) vector data.

See example-compare for a performance test, by adapting the draw code to your usecase. A comparison of Blend2D performance vs other CPU renderers is available on their homepage.

Compatibility

Tested on MacOs + Linux, both of_v0.11.2 and of_v0.12.0. (C++17 is required.) For C++14 you can downgrade libBlend2D to v0.11.5 or use commit 49af45713a5574203b122f8c1c24064f263ac64c. Should work on Windows too, probably with some inclusion fixes.

Installation

If so, update your Command Line Toolkit to at least Xcode 9 and configure it with xcode-select -s.

Usage

For now, we have to use the Blend2D pipeline and commands, there is no ofDraw...() compatibility yet. I recommend reading trough the Blend2D guide to get started using their graphics API.

Some OpenFrameworks / Blend2D glue utilities are being written, any contribution is welcome to facilitate interaction with OF objects.

Please note that Blend2d runs on a JIT interpreter and performance varies a lot between Debug and Release builds due to their respective exported debug symbols and compile-time optimisations. For performance, prefer Release builds.

Configure

Examples

Contributions

Contributions are welcome, don't hesitate to submit a PR or open an issue for talking about bugs or new features.

Future ideas

License

libBlend2D is zLib, by Petr Kobalicek. ofxBlend2D is MIT, by Daan de Lange.

Get this addon

HTTPS
SSH