Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/Archie3d/juce_bgfx

Using bfgx with JUCE
https://github.com/Archie3d/juce_bgfx

Last synced: 3 months ago
JSON representation

Using bfgx with JUCE

Awesome Lists containing this project

README

        

# Using bgfx & nanovg with JUCE

This code demonstrates how to use [bgfx](https://github.com/bkaradzic/bgfx) rendering from within a [JUCE](https://github.com/juce-framework/JUCE) application. Additionally an alternative rendering of JUCE components is implemented via [nanovg](https://github.com/memononen/nanovg) (over bgfx).

> By default bgfx will be using Direct3D on Windows and Metal on MacOS.

## Implementation notes

- On MacOS interaction between JUCE UI and bgfx is possible only on the main thread. Because of this bgfx multithreading must be disabled via `BGFX_CONFIG_MULTITHREADED=0`.

- Nanovg rendering is done via custom `juce::LowLevelGraphicsContext` that forwards drawing calls to nanovg. Unfortunately not all call from the JUCE graphics can be mapped directly to nanovg, but custom paint can be done by accessing the `NVGcontext` directly.