fixed issue with GL_FLOAT vertex attributes
This commit is contained in:
parent
971d3d37e6
commit
d08ddeda7c
16
GL/draw.c
16
GL/draw.c
@ -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) {
|
||||
|
||||
@ -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];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user