aboutsummaryrefslogtreecommitdiffstats
path: root/src/include/glm/gtx/texture.inl
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/glm/gtx/texture.inl')
-rw-r--r--src/include/glm/gtx/texture.inl17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/include/glm/gtx/texture.inl b/src/include/glm/gtx/texture.inl
new file mode 100644
index 0000000..f4992a1
--- /dev/null
+++ b/src/include/glm/gtx/texture.inl
@@ -0,0 +1,17 @@
+/// @ref gtx_texture
+
+namespace glm
+{
+ template <length_t L, typename T, qualifier Q>
+ inline T levels(vec<L, T, Q> const& Extent)
+ {
+ return glm::log2(compMax(Extent)) + static_cast<T>(1);
+ }
+
+ template <typename T>
+ inline T levels(T Extent)
+ {
+ return vec<1, T, defaultp>(Extent).x;
+ }
+}//namespace glm
+