fallback color/texcoord (swDrawArrays)
This commit is contained in:
parent
3c25efc412
commit
5bab07b3e7
7
src/external/rlsw.h
vendored
7
src/external/rlsw.h
vendored
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user