fixed issue with GL_FLOAT vertex attributes

This commit is contained in:
ecker 2026-07-26 00:24:30 -05:00
parent 971d3d37e6
commit d08ddeda7c
2 changed files with 16 additions and 16 deletions

View File

@ -483,16 +483,16 @@ 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];
it->argb[1] = color[1];
it->argb[2] = color[2];
it->argb[3] = color[3];
it->argb[R8IDX] = color[0];
it->argb[G8IDX] = color[1];
it->argb[B8IDX] = color[2];
it->argb[A8IDX] = color[3];
}
if(st) {

View File

@ -55,20 +55,20 @@ 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;
}
} else {
float* color = _glCurrentColor();
for(int_fast32_t i = 0; i < loop; ++i, ++it) {
it->argb[0] = color[0];
it->argb[1] = color[1];
it->argb[2] = color[2];
it->argb[3] = color[3];
it->argb[R8IDX] = color[0];
it->argb[G8IDX] = color[1];
it->argb[B8IDX] = color[2];
it->argb[A8IDX] = color[3];
}
}