Added support for ETC1 and PVR1 compressed textures contained in KTX, PKM, and PVR files.

Most desktop graphics drivers don't support those formats.

--HG--
branch : minor
This commit is contained in:
Alex Szpakowski
2015-01-20 03:18:28 -04:00
parent 319ccc2f25
commit dfdd52e499
21 changed files with 1136 additions and 340 deletions
+21
View File
@@ -47,6 +47,27 @@ typedef uint32_t uint32;
typedef int64_t int64;
typedef uint64_t uint64;
static inline uint16 swap16(uint16 x)
{
return (x >> 8) | (x << 8);
}
static inline uint32 swap32(uint32 x)
{
return ((x & 0x000000FF) << 24) |
((x & 0x0000FF00) << 8) |
((x & 0x00FF0000) >> 8) |
((x & 0xFF000000) >> 24);
}
static inline uint64 swap64(uint64 x)
{
return ((x << 56) & 0xFF00000000000000ULL) | ((x << 40) & 0x00FF000000000000ULL) |
((x << 24) & 0x0000FF0000000000ULL) | ((x << 8) & 0x000000FF00000000ULL) |
((x >> 8) & 0x00000000FF000000ULL) | ((x >> 24) & 0x0000000000FF0000ULL) |
((x >> 40) & 0x000000000000FF00ULL) | ((x >> 56) & 0x00000000000000FFULL);
}
} // love
#endif // LOVE_INT_H