mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
Refactor VisibilityNotifier
* Works from RenderinServer * Accurately tells when on or off-scren, its no longer approximate. * VisibilityEnabler also simplified to use the process mode instead.
This commit is contained in:
parent
badad53438
commit
38d164c74b
16 changed files with 251 additions and 669 deletions
|
@ -117,6 +117,8 @@ void RenderingServerDefault::_draw(bool p_swap_buffers, double frame_step) {
|
|||
_draw_margins();
|
||||
RSG::rasterizer->end_frame(p_swap_buffers);
|
||||
|
||||
RSG::canvas->update_visibility_notifiers();
|
||||
|
||||
while (frame_drawn_callbacks.front()) {
|
||||
Object *obj = ObjectDB::get_instance(frame_drawn_callbacks.front()->get().object);
|
||||
if (obj) {
|
||||
|
@ -396,6 +398,7 @@ RenderingServerDefault::RenderingServerDefault(bool p_create_thread) :
|
|||
server_thread = 0;
|
||||
}
|
||||
|
||||
RSG::threaded = p_create_thread;
|
||||
RSG::canvas = memnew(RendererCanvasCull);
|
||||
RSG::viewport = memnew(RendererViewport);
|
||||
RendererSceneCull *sr = memnew(RendererSceneCull);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue