From c7095de3dee0190551ede51a701f1343c603db27 Mon Sep 17 00:00:00 2001 From: Tom Kneiphof Date: Thu, 7 Mar 2024 18:54:34 +0100 Subject: [PATCH] Add value_ptr method for vec1 types --- glm/gtc/type_ptr.inl | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/glm/gtc/type_ptr.inl b/glm/gtc/type_ptr.inl index 26b20b52e..4e9ed72f9 100644 --- a/glm/gtc/type_ptr.inl +++ b/glm/gtc/type_ptr.inl @@ -7,6 +7,18 @@ namespace glm /// @addtogroup gtc_type_ptr /// @{ + template + GLM_FUNC_QUALIFIER T const* value_ptr(vec<1, T, Q> const& v) + { + return &(v.x); + } + + template + GLM_FUNC_QUALIFIER T* value_ptr(vec<1, T, Q>& v) + { + return &(v.x); + } + template GLM_FUNC_QUALIFIER T const* value_ptr(vec<2, T, Q> const& v) {