From 70e0d503a9ae691ebb9a597527f2b470bd81085a Mon Sep 17 00:00:00 2001 From: Falco Girgis Date: Wed, 19 Feb 2025 13:03:05 -0600 Subject: [PATCH] Fixed incorrect alpha vertex color value. - _readColorXXXARGB() macros were being passed the incorrect input index for the alpha channel from the outer macros, fixed. - Thanks for finding it, UnknownShadow200! --- GL/attributes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GL/attributes.c b/GL/attributes.c index 3d4f50d..8222d2e 100644 --- a/GL/attributes.c +++ b/GL/attributes.c @@ -246,12 +246,12 @@ static void _readColour4dRevARGB(const GLubyte* __restrict__ in, GLubyte* __rest #define DEF_READ_COLOUR_4_ARGB_INT(prefix, intype, max) \ DEF_READ_COLOUR_N_ARGB_INT(prefix, intype, max, \ - ((GLubyte)clamp((float)input[2] / (float)max * 255.0f, 0, 255)), \ + ((GLubyte)clamp((float)input[3] / (float)max * 255.0f, 0, 255)), \ R8IDX, G8IDX, B8IDX, A8IDX) #define DEF_READ_COLOUR_4_REV_ARGB_INT(prefix, intype, max) \ DEF_READ_COLOUR_N_ARGB_INT(prefix##Rev, intype, max, \ - ((GLubyte)clamp((float)input[2] / (float)max * 255.0f, 0, 255)), \ + ((GLubyte)clamp((float)input[3] / (float)max * 255.0f, 0, 255)), \ 0, 1, 2, 3) DEF_READ_COLOUR_3_ARGB_INT(3us, GLushort, UINT16_MAX)