mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-28 07:48:37 -04:00
pgraph: Fix regression: assertion in get_off_clip_planes()
Occurs when using clip plane culling
This commit is contained in:
parent
6075307e66
commit
eacbc4f89a
@ -65,11 +65,15 @@ apply_transform_and_state(CullTraverser *trav) {
|
|||||||
node_state->get_attrib(ClipPlaneAttrib::get_class_slot());
|
node_state->get_attrib(ClipPlaneAttrib::get_class_slot());
|
||||||
const OccluderEffect *occluders = (const OccluderEffect *)
|
const OccluderEffect *occluders = (const OccluderEffect *)
|
||||||
node_effects->get_effect(OccluderEffect::get_class_type());
|
node_effects->get_effect(OccluderEffect::get_class_type());
|
||||||
|
const ClipPlaneAttrib *off_cpa = nullptr;
|
||||||
|
|
||||||
|
if (cpa != nullptr) {
|
||||||
|
_node_reader.check_cached(false);
|
||||||
|
off_cpa = (const ClipPlaneAttrib *)_node_reader.get_off_clip_planes();
|
||||||
|
}
|
||||||
|
|
||||||
if (cpa != nullptr || occluders != nullptr) {
|
if (cpa != nullptr || occluders != nullptr) {
|
||||||
CullPlanes::apply_state(_cull_planes, trav, this, cpa,
|
CullPlanes::apply_state(_cull_planes, trav, this, cpa, off_cpa, occluders);
|
||||||
(const ClipPlaneAttrib *)_node_reader.get_off_clip_planes(),
|
|
||||||
occluders);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user