A three-dimensional header-only graphics library written in C++13 and accelerated with CUDA/Apple Metal.
Before attempting to build this project, make sure you have Nix with Flake support installed on your machine.
Additionally, if you wish to utilize the GPU acceleration features, you will need to have CUDA Toolkit or Apple Metal installed on your machine.
To get a local copy of the project up and running on your machine, follow these simple steps:
-
Clone the project repository
git clone https://github.com/Kaweees/kiwiGL.git cd kiwiGL -
Install the project dependencies
nix-shell --max-jobs $(nproc) # Linux / Windows (WSL) nix-shell --max-jobs $(sysctl -n hw.ncpu) # macOS
-
Build the project
just build
-
Run the project
just run <package_name>
kiwiGL is designed to be easy to use. You can include the library in your C++ project by adding the following line to your source files:
#include <kiwigl/kiwigl.h>kiwiGL is capable of rendering 3D scenes with thousands of triangles at interactive frame rates. The following benchmarks were conducted on a 2019 MacBook Pro with a 2.3 GHz 8-Core Intel Core i9 processor and 16 GB of RAM.
| Benchmark | Description | Result |
|---|---|---|
cube |
Render a cube with 12 triangles | 60 FPS |
sphere |
Render a sphere with 960 triangles | 60 FPS |
bunny |
Render a Stanford Bunny with 69451 triangles | 60 FPS |
dragon |
Render a Stanford Dragon with 871306 triangles | 60 FPS |
kiwiGL uses the following conventions:
- left-handed coordinate system
- counter-clockwise winding order for triangle vertices
kiwiGL uses the following keyboard shortcuts:
| Command Keybind | Command Description |
|---|---|
| CTRL + q | Quit the application |
kiwiGL/
βββ .github/ # GitHub Actions CI/CD workflows
βββ include/ # project header files
β βββ kiwiGL/ # Header files for the kiwiGL library
βββ src/ # project source files
β βββ ... # Entry point, main function
βββ CMakeLists.txt # CMake build script
βββ LICENSE # project license
βββ README.md # you are hereThe source code for Kaweees/kiwiGL is distributed under the terms of the GNU General Public License v3.0, as I firmly believe that collaborating on free and open-source software fosters innovations that mutually and equitably beneficial to both collaborators and users alike. See LICENSE for details and more information.