mirror of
https://github.com/love2d/love.git
synced 2026-08-15 15:51:12 +02:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user