Skip to content

Hardware accelerated, Nintendo Switch inspired UI library for PC and Nintendo Switch

License

GPL-3.0, Zlib licenses found

Licenses found

GPL-3.0
LICENSE
Zlib
COPYING
Notifications You must be signed in to change notification settings

lookye/borealis

Repository files navigation

Borealis

Hardware accelerated, Nintendo Switch inspired UI library for PC and Nintendo Switch. Powered by nanovg. Skeleton based on the hybrid glfw app by fincs.

Building the example for Switch

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.nro

Building the example for PC

To 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_example

Also, please note that the resources folder must be available in the working directory, otherwise the program will fail to find the shaders.

Building the example for Windows using msys2

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

How to use (TL;DR: see the example in this repo)

  1. Your project must be built as C++17 (-std=c++1z). You also need to remove -fno-rtti and -fno-exceptions if you have them
  2. Use a submodule (or even better, a subrepo) to clone this repository in your project
  3. For PC (meson) : use subdir to import the library folder, then use the borealis_files, borealis_dependencies and borealis_include variables to link and add the dependencies and the includes of the library
  4. For Switch : take a standard homebrew makefile and use include to load borealis.mk (after the LIBDIRS definition). Add a BOREALIS_PATH variable before the include, specifying the subfolder you put the library in
  5. Then, add a WINDOW_NAME define that will be, you guessed it, the title of your window
  6. Finally, add a BOREALIS_RESOURCES define pointing to the resources folder, and do the same for the ROMFS definition on the Switch makefile
  7. Finally, copy the resources folder to the root of your project

About

Hardware accelerated, Nintendo Switch inspired UI library for PC and Nintendo Switch

Resources

License

GPL-3.0, Zlib licenses found

Licenses found

GPL-3.0
LICENSE
Zlib
COPYING

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published