ray:: fixed crashes when the raycaster is reset while rendering

This commit is contained in:
Zeno Rogue 2021-05-17 14:21:29 +02:00
parent 8681883e58
commit 3a9f81a248
1 changed files with 3 additions and 0 deletions

View File

@ -1716,6 +1716,7 @@ struct raycast_map {
}
void assign_uniforms(raycaster* o) {
if(!o) return;
glUniform1i(o->uLength, length);
GLERR("uniform mediump length");
@ -1972,6 +1973,8 @@ EX void cast() {
rmap->assign_uniforms(&*o);
}
GLERR("uniform mediump start");
if(!o) { cast(); return; }
uniform2(o->uStartid, rmap->enc(rmap->ids[cs], 0));
}