mirror of
https://github.com/raysan5/raylib.git
synced 2026-01-29 02:09:17 -05:00
Corrected issue #758
This commit is contained in:
@ -3193,12 +3193,14 @@ static int SaveKTX(Image image, const char *fileName)
|
|||||||
{
|
{
|
||||||
KTXHeader ktxHeader;
|
KTXHeader ktxHeader;
|
||||||
|
|
||||||
// KTX identifier (v2.2)
|
// KTX identifier (v1.1)
|
||||||
//unsigned char id[12] = { '«', 'K', 'T', 'X', ' ', '1', '1', '»', '\r', '\n', '\x1A', '\n' };
|
//unsigned char id[12] = { '«', 'K', 'T', 'X', ' ', '1', '1', '»', '\r', '\n', '\x1A', '\n' };
|
||||||
//unsigned char id[12] = { 0xAB, 0x4B, 0x54, 0x58, 0x20, 0x31, 0x31, 0xBB, 0x0D, 0x0A, 0x1A, 0x0A };
|
//unsigned char id[12] = { 0xAB, 0x4B, 0x54, 0x58, 0x20, 0x31, 0x31, 0xBB, 0x0D, 0x0A, 0x1A, 0x0A };
|
||||||
|
|
||||||
|
const char ktxIdentifier[12] = { 0xAB, 'K', 'T', 'X', ' ', '1', '1', 0xBB, '\r', '\n', 0x1A, '\n' };
|
||||||
|
|
||||||
// Get the image header
|
// Get the image header
|
||||||
strcpy(ktxHeader.id, "«KTX 11»\r\n\x1A\n"); // KTX 1.1 signature
|
strncpy(ktxHeader.id, ktxIdentifier, 12); // KTX 1.1 signature
|
||||||
ktxHeader.endianness = 0;
|
ktxHeader.endianness = 0;
|
||||||
ktxHeader.glType = 0; // Obtained from image.format
|
ktxHeader.glType = 0; // Obtained from image.format
|
||||||
ktxHeader.glTypeSize = 1;
|
ktxHeader.glTypeSize = 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user