You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -56,7 +56,7 @@ A three-dimensional header-only graphics library written in C++13 and accelerate
56
56
57
57
### Prerequisites
58
58
59
-
Before attempting to build this project, make sure you have [Simple DirectMedia Layer (SDL 2)](https://wiki.libsdl.org/SDL2/Installation), [GNU Make](https://www.gnu.org/software/make/), and [CMake](https://cmake.org) installed on your machine.
59
+
Before attempting to build this project, make sure you have [Nix](https://nixos.org/download.html) with [Flake](https://nixos.wiki/wiki/Flakes) support installed on your machine.
60
60
61
61
Additionally, if you wish to utilize the GPU acceleration features, you will need to have [CUDA Toolkit](https://developer.nvidia.com/cuda-downloads) or [Apple Metal](https://developer.apple.com/metal/cpp/) installed on your machine.
62
62
@@ -67,89 +67,57 @@ To get a local copy of the project up and running on your machine, follow these
2.Create a fresh build directory and navigate to it
74
+
2.Install the project dependencies
75
75
76
76
```sh
77
-
rm -rf build
78
-
mkdir build
79
-
cd build
77
+
nix-shell
80
78
```
81
79
82
-
3.Generate build files using CMake
80
+
3.Build the project
83
81
84
82
```sh
85
-
cmake -S .. -B . -DCMAKE_BUILD_TYPE=Debug
83
+
just build
86
84
```
87
85
88
-
4.Build the entire project
86
+
4.Run the project
89
87
90
88
```sh
91
-
cmake --build .
89
+
just run <package_name>
92
90
```
93
91
94
-
### Building and Running Tests
95
-
96
-
1. Build only the tests
97
-
98
-
```sh
99
-
cmake --build . --target tests
100
-
```
101
-
102
-
2. Run all tests
103
-
104
-
```sh
105
-
ctest --output-on-failure
106
-
```
107
-
108
-
3. Run a specific test suite
109
-
110
-
```sh
111
-
./tests/test_suite_name
112
-
```
113
-
114
-
### Building and Running Examples
115
-
116
-
1. Build only the examples
117
-
118
-
```sh
119
-
cmake --build . --target examples
120
-
```
121
-
122
-
2. Run a specific example
92
+
## Usage
123
93
124
-
```sh
125
-
./examples/example_name
126
-
```
94
+
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:
127
95
128
-
## Usage
96
+
```cpp
97
+
#include<kiwigl/kiwigl.h>
98
+
```
129
99
130
-
<!--
131
100
### Benchmarks
132
101
133
-
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.
102
+
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.
134
103
135
104
| Benchmark | Description | Result |
136
105
| --------- | ----------- | ------ |
137
106
|`cube`| Render a cube with 12 triangles | 60 FPS |
138
107
|`sphere`| Render a sphere with 960 triangles | 60 FPS |
139
108
|`bunny`| Render a Stanford Bunny with 69451 triangles | 60 FPS |
140
109
|`dragon`| Render a Stanford Dragon with 871306 triangles | 60 FPS |
-[counter-clockwise winding order](https://learnwebgl.brown37.net/model_data/model_volume.html#:~:text=Winding%20Order%20for%20a%20triangle,the%20front%20of%20the%20triangle.) for triangle vertices
149
117
150
118
### Keyboard Controls
151
119
152
-
Kiwigl uses the following keyboard shortcuts:
120
+
kiwiGL uses the following keyboard shortcuts:
153
121
154
122
| Command Keybind | Command Description |
155
123
| --------------- | ------------------- |
@@ -159,29 +127,30 @@ Kiwigl uses the following keyboard shortcuts:
159
127
## Project Structure
160
128
161
129
```sh
162
-
graphics/
163
-
├── .github/ - GitHub Actions CI/CD workflows
164
-
├── include/ - project header files
165
-
├── src/ - project source files
166
-
│ └── main.c - Entry point, main function
167
-
├── CMakeLists.txt - CMake build script
168
-
├── LICENSE - project license
169
-
└── README.md - you are here
130
+
kiwiGL/
131
+
├── .github/ # GitHub Actions CI/CD workflows
132
+
├── include/ # project header files
133
+
│ └── kiwiGL/ # Header files for the kiwiGL library
134
+
├── src/ # project source files
135
+
│ └── ... # Entry point, main function
136
+
├── CMakeLists.txt # CMake build script
137
+
├── LICENSE # project license
138
+
└── README.md # you are here
170
139
```
171
140
172
141
## License
173
142
174
-
The source code for 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`](./LICENSE) for details and more information.
143
+
The source code for [Kaweees/kiwiGL](https://github.com/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`](./LICENSE) for details and more information.
0 commit comments