Skip to content

zeromake/borealis

 
 

Repository files navigation

borealis logo

borealis

Controller and TV oriented UI library for PC and Nintendo Switch (libnx).

⚠️ Warning: the project is a WIP - See the Projects tab to follow the journey towards a stable version!

The code for the old version is available in the legacy branch.

⚠️ The wiki only contains the documentation for the old version of the library, it has yet to be updated!

  • Mimicks the Nintendo Switch system UI, but can also be used to make anything else painlessly
  • Hardware acceleration and vector graphics with automatic scaling for TV usage (powered by nanovg)
  • Can be ported to new platforms and graphics APIs by providing a nanovg implementation
  • Powerful layout engine using flex box as a base for everything (powered by Yoga Layout)
  • Automated navigation paths for out-of-the-box controller navigation
  • Out of the box touch support
  • Define user interfaces using XML and only write code when it matters
  • Use and restyle built-in components or make your own from scratch
  • Display large amount of data efficiently using recycling lists
  • Integrated internationalization and storage systems
  • Integrated toolbox (logger, animations, timers, background tasks...)

Building the demo 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.

cmake -B build_switch -DPLATFORM_SWITCH=ON
make -C build_switch borealis_demo.nro -j$(nproc)

Building the demo for PC

To build for PC, the following components are required:

  • cmake/make 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:

cmake -B build_pc -DPLATFORM_DESKTOP=ON
make -C build_pc -j$(nproc)

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 demo for PSV

We only need: libGLESv2.suprx libgpu_es4_ext.suprx libIMGEGL.suprx libpvrPSP2_WSEGL.suprx

PSV support is experimental at present, and it is very slow to run.

cmake -B build_psv -DPLATFORM_PSV=ON
make -C build_psv borealis_demo.vpk -j$(nproc)

Including in your project (TL;DR: see the CMakeLists.txt 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. Copy the resources folder to the root of your project

Here is my work with borealis: https://github.com/xfangfang/wiliwili

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 79.5%
  • C 18.4%
  • CMake 1.3%
  • Other 0.8%