9
3

texture.inl 309 B

1234567891011121314151617
  1. /// @ref gtx_texture
  2. namespace glm
  3. {
  4. template <length_t L, typename T, qualifier Q>
  5. inline T levels(vec<L, T, Q> const& Extent)
  6. {
  7. return glm::log2(compMax(Extent)) + static_cast<T>(1);
  8. }
  9. template <typename T>
  10. inline T levels(T Extent)
  11. {
  12. return vec<1, T, defaultp>(Extent).x;
  13. }
  14. }//namespace glm