Add value_ptr method for vec1 types

This commit is contained in:
Tom Kneiphof 2024-03-07 18:54:34 +01:00
parent d9de805b6a
commit c7095de3de

View File

@ -7,6 +7,18 @@ namespace glm
/// @addtogroup gtc_type_ptr
/// @{
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER T const* value_ptr(vec<1, T, Q> const& v)
{
return &(v.x);
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER T* value_ptr(vec<1, T, Q>& v)
{
return &(v.x);
}
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER T const* value_ptr(vec<2, T, Q> const& v)
{