fallback color/texcoord (swDrawArrays)

This commit is contained in:
Bigfoot71 2025-05-17 17:55:00 +02:00
parent 3c25efc412
commit 5bab07b3e7

7
src/external/rlsw.h vendored
View File

@ -4898,6 +4898,9 @@ void swDrawArrays(SWdraw mode, int offset, int count)
} }
swBegin(mode); swBegin(mode);
{
swTexCoord2f(0.0f, 0.0f);
swColor4f(1.0f, 1.0f, 1.0f, 1.0f);
for (int i = offset; i < count; i++) { for (int i = offset; i < count; i++) {
if (RLSW.array.texcoords) { if (RLSW.array.texcoords) {
@ -4908,7 +4911,7 @@ void swDrawArrays(SWdraw mode, int offset, int count)
} }
swVertex3fv(RLSW.array.positions + 3 * i); swVertex3fv(RLSW.array.positions + 3 * i);
} }
}
swEnd(); swEnd();
} }
@ -5055,7 +5058,7 @@ void swBindTexture(uint32_t id)
return; return;
} }
if (id > 0 && RLSW.loadedTextures[id].pixels.cptr == NULL) { if (RLSW.loadedTextures[id].pixels.cptr == NULL) {
RLSW.errCode = SW_INVALID_OPERATION; RLSW.errCode = SW_INVALID_OPERATION;
return; return;
} }