Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/Archie3d/juce_bgfx
- Owner: Archie3d
- Created: 2022-03-10T17:22:23.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-03-10T19:06:28.000Z (over 2 years ago)
- Last Synced: 2024-04-23T04:53:42.428Z (7 months ago)
- Language: C
- Size: 581 KB
- Stars: 15
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-juce - juce_bgfx
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.