mirror of
https://github.com/g-truc/glm.git
synced 2024-11-15 06:24:34 +00:00
49 lines
1.4 KiB
C++
49 lines
1.4 KiB
C++
|
/// @brief Include to compute the number of mipmaps levels necessary to create a mipmap complete texture.
|
||
|
/// @file gli/levels.hpp
|
||
|
|
||
|
#pragma once
|
||
|
|
||
|
#include "type.hpp"
|
||
|
|
||
|
namespace gli
|
||
|
{
|
||
|
/// Compute the number of mipmaps levels necessary to create a mipmap complete texture
|
||
|
///
|
||
|
/// @param Extent Extent of the texture base level mipmap
|
||
|
/// @tparam vecType Vector type used to express the dimensions of a texture of any kind.
|
||
|
/// @code
|
||
|
/// #include <gli/texture2d.hpp>
|
||
|
/// #include <gli/levels.hpp>
|
||
|
/// ...
|
||
|
/// gli::texture2d::extent_type Extent(32, 10);
|
||
|
/// gli::texture2d Texture(gli::levels(Extent));
|
||
|
/// @endcode
|
||
|
template <typename T, precision P, template <typename, precision> class vecType>
|
||
|
T levels(vecType<T, P> const& Extent);
|
||
|
/*
|
||
|
/// Compute the number of mipmaps levels necessary to create a mipmap complete texture
|
||
|
///
|
||
|
/// @param Extent Extent of the texture base level mipmap
|
||
|
/// @code
|
||
|
/// #include <gli/texture2d.hpp>
|
||
|
/// #include <gli/levels.hpp>
|
||
|
/// ...
|
||
|
/// gli::texture2d Texture(32);
|
||
|
/// @endcode
|
||
|
size_t levels(size_t Extent);
|
||
|
|
||
|
/// Compute the number of mipmaps levels necessary to create a mipmap complete texture
|
||
|
///
|
||
|
/// @param Extent Extent of the texture base level mipmap
|
||
|
/// @code
|
||
|
/// #include <gli/texture2d.hpp>
|
||
|
/// #include <gli/levels.hpp>
|
||
|
/// ...
|
||
|
/// gli::texture2d Texture(32);
|
||
|
/// @endcode
|
||
|
int levels(int Extent);
|
||
|
*/
|
||
|
}//namespace gli
|
||
|
|
||
|
#include "./core/levels.inl"
|