From 4e7ba0899f8cfe14b939c1aa3fa4657d0d17a4a3 Mon Sep 17 00:00:00 2001 From: Josh Yelon Date: Wed, 1 Feb 2006 22:55:11 +0000 Subject: [PATCH] Moved tick to right before app processing --- panda/src/display/graphicsEngine.cxx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/panda/src/display/graphicsEngine.cxx b/panda/src/display/graphicsEngine.cxx index 12ad6bdb1a..7a8b4e0fff 100644 --- a/panda/src/display/graphicsEngine.cxx +++ b/panda/src/display/graphicsEngine.cxx @@ -513,14 +513,8 @@ render_frame() { } } - // Now cycle the pipeline and officially begin the next frame. + // Now cycle the pipeline _pipeline->cycle(); - ClockObject *global_clock = ClockObject::get_global_clock(); - global_clock->tick(); - if (global_clock->check_errors()) { - throw_event("clock_error"); - } - PStatClient::main_tick(); // Reset our pcollectors that track data across the frame. CullTraverser::_nodes_pcollector.clear_level(); @@ -562,6 +556,14 @@ render_frame() { select(0, NULL, NULL, NULL, &tv); } + // officially begin the next frame. + ClockObject *global_clock = ClockObject::get_global_clock(); + global_clock->tick(); + if (global_clock->check_errors()) { + throw_event("clock_error"); + } + PStatClient::main_tick(); + // Anything that happens outside of GraphicsEngine::render_frame() // is deemed to be App. _app_pcollector.start();