summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHunter Kvalevog <hunter@kvog.sh>2025-11-26 00:19:26 -0800
committerHunter Kvalevog <hunter@kvog.sh>2025-11-26 00:19:26 -0800
commit69151820e0ef4096c6dc5e5c35470fcd91d86a84 (patch)
treeb2808086c9439a055e2475104632f92c43da08a7
parenta18ad3a6436eb298bea80223aa3be57d63c948ab (diff)
shaders: Fix Visual Studio build
-rw-r--r--.gitignore1
-rw-r--r--shaders/CMakeLists.txt2
-rw-r--r--shaders/main.cc4
3 files changed, 5 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
index 6cc1b64..b6d696d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
.DS_Store
.cache
+.vs
bin
build \ No newline at end of file
diff --git a/shaders/CMakeLists.txt b/shaders/CMakeLists.txt
index 86b6db1..437476b 100644
--- a/shaders/CMakeLists.txt
+++ b/shaders/CMakeLists.txt
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.15 FATAL_ERROR)
-project(shaders CXX)
+project(shaders)
set(DEMO_NEEDS_DEAR_IMGUI TRUE)
set(DEMO_NEEDS_SDL3 TRUE)
diff --git a/shaders/main.cc b/shaders/main.cc
index 443f08e..11688b5 100644
--- a/shaders/main.cc
+++ b/shaders/main.cc
@@ -25,6 +25,8 @@
// Geometry
// --------------------------------------------------------------------------------
+constexpr float Pi = 3.1415926535f;
+
template <typename T>
static inline T Min(T lhs, T rhs)
{
@@ -45,7 +47,7 @@ static inline T Clamp(T val, T vmin, T vmax)
static inline float Radians(float degrees)
{
- return degrees * M_PI / 180.0f;
+ return degrees * Pi / 180.0f;
}
class Vec2