From 2ea55d6d94aeb89b9c8810b5423fea41fd82d899 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Sat, 26 Feb 2022 15:33:00 +0100 Subject: [PATCH] Ensure no M_PI collision, add LSP support --- CMakeLists.txt | 1 + src/utilities/shapes.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 34e0e10..8a65854 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,6 +3,7 @@ # cmake_minimum_required(VERSION 3.6) project (glowbox) +set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE INTERNAL "") # nice for language servers # # Set python cmd, preferring python 3 diff --git a/src/utilities/shapes.cpp b/src/utilities/shapes.cpp index 1d1a2a6..87d3c08 100644 --- a/src/utilities/shapes.cpp +++ b/src/utilities/shapes.cpp @@ -1,7 +1,9 @@ #include #include "shapes.h" +#ifndef M_PI #define M_PI 3.14159265359f +#endif Mesh cube(glm::vec3 scale, glm::vec2 textureScale, bool tilingTextures, bool inverted, glm::vec3 textureScale3d) { glm::vec3 points[8];