Skip to content

Commit ab913bb

Browse files
tomix1024christophe-lunarg
authored andcommitted
Add value_ptr method for vec1 types
1 parent c32a481 commit ab913bb

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

glm/gtc/type_ptr.inl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,18 @@ namespace glm
77
/// @addtogroup gtc_type_ptr
88
/// @{
99

10+
template<typename T, qualifier Q>
11+
GLM_FUNC_QUALIFIER T const* value_ptr(vec<1, T, Q> const& v)
12+
{
13+
return &(v.x);
14+
}
15+
16+
template<typename T, qualifier Q>
17+
GLM_FUNC_QUALIFIER T* value_ptr(vec<1, T, Q>& v)
18+
{
19+
return &(v.x);
20+
}
21+
1022
template<typename T, qualifier Q>
1123
GLM_FUNC_QUALIFIER T const* value_ptr(vec<2, T, Q> const& v)
1224
{

0 commit comments

Comments
 (0)