1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Fixed Timestep Interpolation (3D)

Adds 3D fixed timestep interpolation to the rendering server.
This does not yet include support for multimeshes or particles.

Co-authored-by: lawnjelly <lawnjelly@gmail.com>
This commit is contained in:
Ricardo Buring
2024-05-26 19:39:28 +02:00
parent 42e5b3ac2d
commit 2f8ab4a654
31 changed files with 1470 additions and 69 deletions

View File

@@ -381,12 +381,9 @@ void RenderingServerDefault::_thread_loop() {
/* INTERPOLATION */
void RenderingServerDefault::tick() {
RSG::canvas->tick();
}
void RenderingServerDefault::set_physics_interpolation_enabled(bool p_enabled) {
RSG::canvas->set_physics_interpolation_enabled(p_enabled);
RSG::scene->set_physics_interpolation_enabled(p_enabled);
}
/* EVENT QUEUING */
@@ -411,6 +408,15 @@ void RenderingServerDefault::draw(bool p_swap_buffers, double frame_step) {
}
}
void RenderingServerDefault::tick() {
RSG::canvas->tick();
RSG::scene->tick();
}
void RenderingServerDefault::pre_draw(bool p_will_draw) {
RSG::scene->pre_draw(p_will_draw);
}
void RenderingServerDefault::_call_on_render_thread(const Callable &p_callable) {
p_callable.call();
}