Hardware accelerated, Nintendo Switch inspired UI library for PC and Nintendo Switch. Powered by nanovg. Skeleton based on the hybrid glfw app by fincs.
To build for Switch, a standard development environment must first be set up. In order to do so, refer to the Getting Started guide.
(sudo) (dkp-)pacman -S switch-glfw switch-mesa switch-glm
make -j
nxlink -s borealis_example.nroTo build for PC, the following components are required:
- meson/ninja build system
- A C++ compiler supporting the C++17 standard
- GLFW version 3.3 or higher (as a static library)
- GLM version 0.9.8 or higher
Please refer to the usual sources of information for your particular operating system. Usually the commands needed to build this project will look like this:
meson build
ninja -C build
./build/borealis_exampleAlso, please note that the resources folder must be available in the working directory, otherwise the program will fail to find the shaders.
msys2 provides all packages needed to build this project:
pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-meson mingw-w64-x86_64-ninja mingw-w64-x86_64-pkg-config mingw-w64-x86_64-glfw mingw-w64-x86_64-glm
meson build
ninja -C build
./build/borealis_example- Your project must be built as C++17 (
-std=c++1z). You also need to remove-fno-rttiand-fno-exceptionsif you have them - Use a submodule (or even better, a subrepo) to clone this repository in your project
- For PC (meson) : use
subdirto import the library folder, then use theborealis_files,borealis_dependenciesandborealis_includevariables to link and add the dependencies and the includes of the library - For Switch : take a standard homebrew makefile and use include to load
borealis.mk(after theLIBDIRSdefinition). Add aBOREALIS_PATHvariable before the include, specifying the subfolder you put the library in - Then, add a
WINDOW_NAMEdefine that will be, you guessed it, the title of your window - Finally, add a
BOREALIS_RESOURCESdefine pointing to the resources folder, and do the same for theROMFSdefinition on the Switch makefile - Finally, copy the resources folder to the root of your project