Skip to content
/ kiwiGL Public
generated from Kaweees/KiwiCPP

πŸ”­ A three-dimensional graphics engine from scratch written in C++17 and accelerated with CUDA/Apple Metal

License

Notifications You must be signed in to change notification settings

Kaweees/kiwiGL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Contributors Forks Stargazers

C++ Logo

A three-dimensional header-only graphics library written in C++13 and accelerated with CUDA/Apple Metal.

Built With

C++ CUDA Apple WebAssembly CMake Codecov GitHub Actions

Preview

Video demonstration

Getting Started

Prerequisites

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.

Installation

To get a local copy of the project up and running on your machine, follow these simple steps:

  1. Clone the project repository

    git clone https://github.com/Kaweees/kiwiGL.git
    cd kiwiGL
  2. Install the project dependencies

    nix-shell --max-jobs $(nproc) # Linux / Windows (WSL)
    nix-shell --max-jobs $(sysctl -n hw.ncpu) # macOS
  3. Build the project

    just build
  4. Run the project

    just run <package_name>

Usage

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>

Benchmarks

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

Conventions

kiwiGL uses the following conventions:

Keyboard Controls

kiwiGL uses the following keyboard shortcuts:

Command Keybind Command Description
CTRL + q Quit the application

Project Structure

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 here

License

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

About

πŸ”­ A three-dimensional graphics engine from scratch written in C++17 and accelerated with CUDA/Apple Metal

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •