52 nassertv(max_updates >= 0);
53 nassertv(_atlas ==
nullptr);
54 if (max_updates == 0) {
55 shadowmanager_cat.warning() <<
"max_updates set to 0, no shadows will be updated." << std::endl;
57 _max_updates = max_updates;
72 nassertv(atlas_size >= 16 && atlas_size <= 16384);
73 nassertv(_atlas ==
nullptr);
74 _atlas_size = atlas_size;
96 nassertr(_atlas !=
nullptr,
nullptr);
115 nassertv(_atlas ==
nullptr);
116 _scene_parent = scene_parent;
130 nassertv(tag_mgr !=
nullptr);
131 nassertv(_atlas ==
nullptr);
132 _tag_state_mgr = tag_mgr;
150 nassertv(graphics_output !=
nullptr);
151 nassertv(_atlas ==
nullptr);
152 _atlas_graphics_output = graphics_output;
168 nassertr(_atlas !=
nullptr,
false);
169 nassertr(source !=
nullptr,
false);
171 if (_queued_updates.size() >= _max_updates) {
172 if (shadowmanager_cat.is_debug()) {
173 shadowmanager_cat.debug() <<
"cannot update source, out of update slots" << std::endl;
179 _queued_updates.push_back(source);
190 inline size_t ShadowManager::get_num_update_slots_left()
const {
191 return _max_updates - _queued_updates.size();
void set_atlas_graphics_output(GraphicsOutput *graphics_output)
Sets the handle to the Shadow targets output.
bool is_empty() const
Returns true if the NodePath contains no nodes.
get_atlas_size
Returns the shadow atlas size.
void set_max_updates(size_t max_updates)
RenderPipeline.
void set_scene(NodePath scene_parent)
Sets the target scene.
void set_tag_state_manager(TagStateManager *tag_mgr)
Sets the handle to the TagStageManager.
bool add_update(const ShadowSource *source)
Adds a new shadow update.
get_atlas
Returns a handle to the shadow atlas.
This is a base class for the various different classes that represent the result of a frame of render...
Class which manages distributing shadow maps in an atlas.
set_atlas_size
Sets the shadow atlas size.
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...