Skip to content

Commit

Permalink
Add value_ptr method for vec1 types
Browse files Browse the repository at this point in the history
  • Loading branch information
tomix1024 authored and christophe-lunarg committed Mar 12, 2024
1 parent c32a481 commit ab913bb
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions glm/gtc/type_ptr.inl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit ab913bb

Please sign in to comment.