aboutsummaryrefslogtreecommitdiffstats
path: root/src/include/glm/gtx/texture.inl
blob: f4992a1691be60ec15178c402f857945ba5f9f1c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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