A minimal template to get started using the cross platform graphics library bgfx. By combining bgfx with a windowing library such as glfw we can create graphical applications which run on all systems using the best graphics api available.
- Simple and clean
- Up to date
- Easy build system
- Includes common utilities
You need Premake in your PATH
.
For Windows you can use either MSVC or MinGW. For Linux you need standard build tools.
For development Visual Studio Code is suggested with the C++ extension.
To get started clone the repository and its submodules:
git clone --recurse-submodules https://github.com/vinnyhorgan/bgfx-starter.git
Then from inside the folder run:
premake5 vs2022
Then you can open the generated solution using Visual Studio.
If you have msbuild
in your PATH
, then you can just run:
.\scripts\build_msvc.bat
premake5 gmake
Then:
.\scripts\build_mingw.bat
On linux you can choose between X11 and Wayland.
premake5 gmake
premake5 --use-wayland gmake
Then:
./scripts/build_linux.sh
- Add MacOS support
- Fix any issues
Thanks to all the following amazing projects:
This template actually uses a fork of glfw that fixes event blocking on Windows: