From 028d927b6da97b52e15e55709120c41f2b21067f Mon Sep 17 00:00:00 2001 From: Lephe Date: Mon, 5 Jul 2021 17:08:37 +0200 Subject: [PATCH] meta: add GLM as a submodule --- .gitmodules | 3 +++ CMakeLists.txt | 4 +++- azur/glsl/vs_tex2d.glsl | 2 +- glm | 1 + glm-builds/CMakeLists.txt | 5 +++++ 5 files changed, 13 insertions(+), 2 deletions(-) create mode 160000 glm create mode 100644 glm-builds/CMakeLists.txt diff --git a/.gitmodules b/.gitmodules index 028a4fb..9a2f372 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "imgui"] path = imgui url = https://github.com/ocornut/imgui +[submodule "glm"] + path = glm + url = https://github.com/g-truc/glm diff --git a/CMakeLists.txt b/CMakeLists.txt index 1a84732..d307290 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -65,9 +65,11 @@ endif() #--- -# This provides Dear ImGui but also GL3W as an OpenGL loader if(NOT FACETS_PLATFORM STREQUAL gint) + # This provides Dear ImGui but also GL3W as an OpenGL loader add_subdirectory(imgui-builds) + # This provide GLM + add_subdirectory(glm-builds) endif() add_subdirectory(azur) diff --git a/azur/glsl/vs_tex2d.glsl b/azur/glsl/vs_tex2d.glsl index b726330..952d171 100644 --- a/azur/glsl/vs_tex2d.glsl +++ b/azur/glsl/vs_tex2d.glsl @@ -6,7 +6,7 @@ layout(location=1) in vec2 a_texture_pos; /* Location in image space */ out vec2 v_position; -uniform vec3 u_windowSize; +uniform vec2 u_windowSize; void main() { v_position = a_texture_pos; diff --git a/glm b/glm new file mode 160000 index 0000000..84f2045 --- /dev/null +++ b/glm @@ -0,0 +1 @@ +Subproject commit 84f2045a79a4aa2454801a98e2de0401bd9c8aee diff --git a/glm-builds/CMakeLists.txt b/glm-builds/CMakeLists.txt new file mode 100644 index 0000000..9ea42fb --- /dev/null +++ b/glm-builds/CMakeLists.txt @@ -0,0 +1,5 @@ +# Define the header-only library +add_library(glm INTERFACE) + +# Set the include directory +target_include_directories(glm INTERFACE ../glm)