Dualie
|
Dualie is a 3DS homebrew library heavily based on SFML that utilizes citro2d. It aims to provide an abstraction of citro2d.
Dualie is very early in development and currently only supports bare bones graphics programming. Contributions are welcome in any area.
You can find the documentation for dualie here. Not many examples of the library currently exist, however you can see a port of tetris that made using the library here.
DevkitPro is required to build this library. Dualie also depends on libopusfile and pkg-config, which can be installed through devkitPro's pacman package manager like so: pacman -S 3ds-opusfile 3ds-pkg-config
To build, set -DCMAKE_TOOLCHAIN_FILE to wherever 3DS.cmake lies in your filesystem, then build the project normally using CMake. You can install the library by using make install
or ninja install
. Note that the DEVKITPRO
environment variable needs to be correctly set.
Similar to building, libopusfile and pkg-config must be installed, and CMAKE_TOOLCHAIN_FILE
must be set to the 3ds.cmake file. Dualie_DIR
then needs to be set to the cmake directory located in the dualie root directory. If the config file cannot be found, set CMAKE_PREFIX_PATH
to the Dualie_DIR variable like so: set(CMAKE_PREFIX_PATH ${Dualie_DIR}
Then one can link to the library normally: target_link_libraries(${PROJECT_NAME} ${DUALIE_LIBRARY})
Below is a sample CMakeLists.txt that fully links the library and its dependencies:
Similarly to SFML, graphics revolve around a RenderWindow object, and draw targets can be selected in the clear function. Below is a simple program that draws a rectangle to the top screen and a circle to the bottom screen.