clarify comments

i hope it's clear ennough
This commit is contained in:
SuperUserNameMan 2024-06-27 14:24:00 +02:00 committed by GitHub
parent 3900e9c765
commit ec5165f58e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4815,9 +4815,9 @@ static Image LoadImageFromCgltfImage(cgltf_image *cgltfImage, const char *texPat
else else
{ {
int base64Size = (int)strlen(cgltfImage->uri + i + 1); int base64Size = (int)strlen(cgltfImage->uri + i + 1);
while (cgltfImage->uri[i + base64Size] == '=') base64Size--; // remove optional paddings while (cgltfImage->uri[i + base64Size] == '=') base64Size--; // Ignore optional paddings
int numberOfEncodedBits = base64Size*6 - (base64Size*6) % 8 ; // ignore extra bits int numberOfEncodedBits = base64Size*6 - (base64Size*6) % 8 ; // Encoded bits minus extra bits, so it becomes a multiple of 8 bits
int outSize = numberOfEncodedBits/8 ; // actual encoded bytes int outSize = numberOfEncodedBits/8 ; // Actual encoded bytes
void *data = NULL; void *data = NULL;
cgltf_options options = { 0 }; cgltf_options options = { 0 };