mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-18 05:03:02 +00:00
ray:: fixed crashes when the raycaster is reset while rendering
This commit is contained in:
parent
8681883e58
commit
3a9f81a248
@ -1716,6 +1716,7 @@ struct raycast_map {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void assign_uniforms(raycaster* o) {
|
void assign_uniforms(raycaster* o) {
|
||||||
|
if(!o) return;
|
||||||
glUniform1i(o->uLength, length);
|
glUniform1i(o->uLength, length);
|
||||||
GLERR("uniform mediump length");
|
GLERR("uniform mediump length");
|
||||||
|
|
||||||
@ -1972,6 +1973,8 @@ EX void cast() {
|
|||||||
rmap->assign_uniforms(&*o);
|
rmap->assign_uniforms(&*o);
|
||||||
}
|
}
|
||||||
GLERR("uniform mediump start");
|
GLERR("uniform mediump start");
|
||||||
|
|
||||||
|
if(!o) { cast(); return; }
|
||||||
uniform2(o->uStartid, rmap->enc(rmap->ids[cs], 0));
|
uniform2(o->uStartid, rmap->enc(rmap->ids[cs], 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user