Skip to content

Commit 3a441c2

Browse files
committed
Add glm (again).
- fix CMakeLists.txt from 70094e6 - glm from https://github.com/g-truc/glm
1 parent 8409f19 commit 3a441c2

File tree

4 files changed

+11
-0
lines changed

4 files changed

+11
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ Temporary Items
179179
# External Libraries
180180
glfw/
181181
glfw3webgpu/
182+
glm/
182183
webgpu/
183184

184185
# Obj files

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ add_executable(WebGPUTracer
2626
external/implementation.cpp)
2727

2828
include_directories(src/include)
29+
include_directories(glm)
2930
include_directories("external/stb")
3031
include_directories("external/tinyobjloader")
3132

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ This renderer is based on ["Learn WebGPU for C++"](https://eliemichel.github.io/
99
## Requirements
1010

1111
- [GLFW](https://eliemichel.github.io/LearnWebGPU/getting-started/opening-a-window.html#installation-of-glfw)
12+
- [GLM](https://github.com/g-truc/glm)
1213
- WebGPU related
1314
- [GLFW3 WebGPU Extension](https://eliemichel.github.io/LearnWebGPU/getting-started/the-adapter.html#glfw3-webgpu-extension)
1415
- [WebGPU](https://eliemichel.github.io/LearnWebGPU/getting-started/hello-webgpu.html#option-c-the-flexibility-of-both)

src/include/utils/util.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,18 @@
1010
#include <array>
1111
#include <random>
1212

13+
#define GLM_FORCE_DEPTH_ZERO_TO_ONE
14+
#define GLM_FORCE_LEFT_HANDED
15+
16+
#include <glm.hpp>
17+
#include <ext.hpp>
1318

1419
using std::shared_ptr;
1520
using std::make_shared;
1621
using std::sqrt;
22+
using glm::vec3;
23+
using glm::vec4;
24+
using glm::mat4x4;
1725

1826
constexpr double INF = std::numeric_limits<double>::infinity();
1927

0 commit comments

Comments
 (0)