- Fixed ldexp implementation

- Increased assert coverage
- Increased static_assert coverage
- Replaced GLM traits by STL traits when possible
- Allowed including individual core feature
This commit is contained in:
Christophe Riccio
2013-09-16 03:03:49 +02:00
parent cd0519d24b
commit d37d3539ed
46 changed files with 506 additions and 259 deletions

View File

@@ -14,6 +14,22 @@
namespace gli
{
enum comp
{
X = 0,
R = 0,
S = 0,
Y = 1,
G = 1,
T = 1,
Z = 2,
B = 2,
P = 2,
W = 3,
A = 3,
Q = 3
};
//template <template <typename> class mem>
class texture2D
{
@@ -45,7 +61,7 @@ namespace gli
void resize(level_type const & Levels);
template <typename genType>
void swizzle(glm::comp X, glm::comp Y, glm::comp Z, glm::comp W);
void swizzle(gli::comp X, gli::comp Y, gli::comp Z, gli::comp W);
private:
std::vector<image2D> Images;

View File

@@ -86,7 +86,7 @@ namespace gli
}
template <typename genType>
inline void texture2D::swizzle(glm::comp X, glm::comp Y, glm::comp Z, glm::comp W)
inline void texture2D::swizzle(gli::comp X, gli::comp Y, gli::comp Z, gli::comp W)
{
for(texture2D::level_type Level = 0; Level < this->levels(); ++Level)
{

View File

@@ -91,9 +91,9 @@ namespace loader_tga
// TGA images are saved in BGR or BGRA format.
if(TexelSize == 24)
Image.swizzle<glm::u8vec3>(glm::B, glm::G, glm::R, glm::A);
Image.swizzle<glm::u8vec3>(gli::B, gli::G, gli::R, gli::A);
if(TexelSize == 32)
Image.swizzle<glm::u8vec4>(glm::B, glm::G, glm::R, glm::A);
Image.swizzle<glm::u8vec4>(gli::B, gli::G, gli::R, gli::A);
return Image;
}
@@ -124,9 +124,9 @@ namespace loader_tga
unsigned char Descriptor = 0;
if(TexelSize == 24)
Image.swizzle<glm::u8vec3>(glm::B, glm::G, glm::R, glm::A);
Image.swizzle<glm::u8vec3>(gli::B, gli::G, gli::R, gli::A);
if(TexelSize == 32)
Image.swizzle<glm::u8vec4>(glm::B, glm::G, glm::R, glm::A);
Image.swizzle<glm::u8vec4>(gli::B, gli::G, gli::R, gli::A);
FileOut.write((char*)&IdentificationFieldSize, sizeof(IdentificationFieldSize));
FileOut.write((char*)&ColorMapType, sizeof(ColorMapType));