glm/test/external/gli/core/save.inl

23 lines
561 B
Plaintext
Raw Normal View History

2016-11-18 22:16:29 +00:00
#include "../save_dds.hpp"
#include "../save_kmg.hpp"
#include "../save_ktx.hpp"
namespace gli
{
inline bool save(texture const & Texture, char const * Path)
{
return save(Texture, std::string(Path));
}
inline bool save(texture const & Texture, std::string const & Path)
{
if(Path.rfind(".dds") != std::string::npos)
return save_dds(Texture, Path);
if(Path.rfind(".kmg") != std::string::npos)
return save_kmg(Texture, Path);
if(Path.rfind(".ktx") != std::string::npos)
return save_ktx(Texture, Path);
return false;
}
}//namespace gli