From 9d3d1a0e26e8d66932875845c0673ed5e77865e5 Mon Sep 17 00:00:00 2001 From: ecker Date: Mon, 3 Aug 2026 23:20:11 -0500 Subject: [PATCH] fixed issue with GL_FLOAT vertex attributes --- GL/draw.c | 8 ++++---- GL/draw_fastpath.inc | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/GL/draw.c b/GL/draw.c index 4466bd4..dd3af97 100644 --- a/GL/draw.c +++ b/GL/draw.c @@ -483,10 +483,10 @@ static void generateElementsFastPath( if(col) { col = (GLubyte*) ATTRIB_LIST.colour.ptr + (idx * dstride); - it->argb[0] = ((float*) col)[0]; - it->argb[1] = ((float*) col)[1]; - it->argb[2] = ((float*) col)[2]; - it->argb[3] = ((float*) col)[3]; + it->argb[R8IDX] = ((float*) col)[0]; + it->argb[G8IDX] = ((float*) col)[1]; + it->argb[B8IDX] = ((float*) col)[2]; + it->argb[A8IDX] = ((float*) col)[3]; } else { const float* color = _glCurrentColor(); it->argb[0] = color[0]; diff --git a/GL/draw_fastpath.inc b/GL/draw_fastpath.inc index b8df8c4..8f7116b 100644 --- a/GL/draw_fastpath.inc +++ b/GL/draw_fastpath.inc @@ -55,10 +55,10 @@ MAKE_FUNC(POLYMODE) PREFETCH(ptr); for(int_fast32_t i = 0; i < loop; ++i, ++it) { PREFETCH(ptr + stride); - it->argb[0] = ((float*) ptr)[0]; - it->argb[1] = ((float*) ptr)[1]; - it->argb[2] = ((float*) ptr)[2]; - it->argb[3] = ((float*) ptr)[3]; + it->argb[R8IDX] = ((float*) ptr)[0]; + it->argb[G8IDX] = ((float*) ptr)[1]; + it->argb[B8IDX] = ((float*) ptr)[2]; + it->argb[A8IDX] = ((float*) ptr)[3]; ptr += stride; }