Rasterizers are now in sync with engine
The rasterisers (both GLES3 and GLES2) were calculating their own frame delta time This fix lets the rasterizers get the frame delta through the draw call That way any regulations to the frame step from the main script will not cause particle systems to process at a different step than the rest of the Engine. Remove unused rasterizer storage variable frame.prev_tick variable were not used anywhere and has been removed
This commit is contained in:
parent
6a69f92370
commit
35eb7f2d6a
17 changed files with 33 additions and 58 deletions
|
|
@ -37,11 +37,11 @@ void VisualServerWrapMT::thread_exit() {
|
|||
exit = true;
|
||||
}
|
||||
|
||||
void VisualServerWrapMT::thread_draw() {
|
||||
void VisualServerWrapMT::thread_draw(bool p_swap_buffers, double frame_step) {
|
||||
|
||||
if (!atomic_decrement(&draw_pending)) {
|
||||
|
||||
visual_server->draw();
|
||||
visual_server->draw(p_swap_buffers, frame_step);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -91,15 +91,15 @@ void VisualServerWrapMT::sync() {
|
|||
}
|
||||
}
|
||||
|
||||
void VisualServerWrapMT::draw(bool p_swap_buffers) {
|
||||
void VisualServerWrapMT::draw(bool p_swap_buffers, double frame_step) {
|
||||
|
||||
if (create_thread) {
|
||||
|
||||
atomic_increment(&draw_pending);
|
||||
command_queue.push(this, &VisualServerWrapMT::thread_draw);
|
||||
command_queue.push(this, &VisualServerWrapMT::thread_draw, p_swap_buffers, frame_step);
|
||||
} else {
|
||||
|
||||
visual_server->draw(p_swap_buffers);
|
||||
visual_server->draw(p_swap_buffers, frame_step);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue