allow cull callback disabling

This commit is contained in:
Zachary Pavlov 2008-12-12 01:15:01 +00:00
parent b4fdf5cc46
commit af435acd5c
2 changed files with 16 additions and 1 deletions

View File

@ -2835,6 +2835,21 @@ set_cull_callback() {
CLOSE_ITERATE_CURRENT_AND_UPSTREAM(_cycler);
}
////////////////////////////////////////////////////////////////////
// Function: PandaNode::disable_cull_callback
// Access: Protected
// Description: disables the call back
////////////////////////////////////////////////////////////////////
void PandaNode::
disable_cull_callback() {
Thread *current_thread = Thread::get_current_thread();
OPEN_ITERATE_CURRENT_AND_UPSTREAM(_cycler, current_thread) {
CDStageWriter cdata(_cycler, pipeline_stage, current_thread);
cdata->set_fancy_bit(FB_cull_callback, false);
}
CLOSE_ITERATE_CURRENT_AND_UPSTREAM(_cycler);
}
////////////////////////////////////////////////////////////////////
// Function: PandaNode::stage_remove_child
// Access: Private

View File

@ -325,7 +325,7 @@ protected:
Thread *current_thread);
void set_cull_callback();
void disable_cull_callback();
public:
virtual void r_prepare_scene(const RenderState *state,
PreparedGraphicsObjects *prepared_objects,