Sha256: a72dab846aa52d1d4762c8f4ab669b86cff01cb7e11c350f4df403cc8b8e4597

Contents?: true

Size: 1.19 KB

Versions: 21

Compression:

Stored size: 1.19 KB

Contents

///////////////////////////////////////////////////////////////////////////////////////////////////
// OpenGL Image Copyright (c) 2008 - 2011 G-Truc Creation (www.g-truc.net)
///////////////////////////////////////////////////////////////////////////////////////////////////
// Created : 2010-09-08
// Updated : 2010-09-27
// Licence : This source is under MIT License
// File    : gli/gtx/loader.inl
///////////////////////////////////////////////////////////////////////////////////////////////////

namespace gli{
namespace gtx{
namespace loader
{
	inline texture2D load
	(
		std::string const & Filename
	)
	{
		if(Filename.find(".dds") != std::string::npos)
			return loadDDS10(Filename);
		else if(Filename.find(".tga") != std::string::npos)
			return loadTGA(Filename);
		else
		{
			assert(0); // File format not supported
			return texture2D();
		}
	}

	inline void save
	(
		texture2D const & Image, 
		std::string const & Filename
	)
	{
		if(Filename.find(".dds") != std::string::npos)
			saveDDS10(Image, Filename);
		else if(Filename.find(".tga") != std::string::npos)
			saveTGA(Image, Filename);
		else
			assert(0); // File format not supported
	}

}//namespace loader
}//namespace gtx
}//namespace gli

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
pixo-0.4.5 ext/pixo/ext/glm/test/external/gli/gtx/loader.inl
pixo-0.4.4 ext/pixo/ext/glm/test/external/gli/gtx/loader.inl
pixo-0.4.3 ext/pixo/ext/glm/test/external/gli/gtx/loader.inl
pixo-0.4.2 ext/pixo/ext/glm/test/external/gli/gtx/loader.inl
pixo-0.4.1 ext/pixo/ext/glm/test/external/gli/gtx/loader.inl
pixo-0.4.0 ext/pixo/ext/glm/test/external/gli/gtx/loader.inl
pixo-0.3.2 ext/pixo/ext/glm/test/external/gli/gtx/loader.inl
pixo-0.3.1 ext/pixo/ext/glm/test/external/gli/gtx/loader.inl
pixo-0.3.0 ext/pixo/ext/glm/test/external/gli/gtx/loader.inl
pixo-0.2.6 ext/pixo/ext/glm/test/external/gli/gtx/loader.inl
pixo-0.2.5 ext/pixo/ext/glm/test/external/gli/gtx/loader.inl
pixo-0.2.4 ext/pixo/ext/glm/test/external/gli/gtx/loader.inl
pixo-0.2.3 ext/pixo/ext/glm/test/external/gli/gtx/loader.inl
pixo-0.2.2 ext/pixo/ext/glm/test/external/gli/gtx/loader.inl
pixo-0.2.1 ext/pixo/ext/glm/test/external/gli/gtx/loader.inl
pixo-0.2.0 ext/pixo/ext/glm/test/external/gli/gtx/loader.inl
pixo-0.1.4 ext/pixo/ext/glm/test/external/gli/gtx/loader.inl
pixo-0.1.3 ext/pixo/ext/glm/test/external/gli/gtx/loader.inl
pixo-0.1.2 ext/pixo/ext/glm/test/external/gli/gtx/loader.inl
pixo-0.1.1 ext/pixo/ext/glm/test/external/gli/gtx/loader.inl