MCPcopy Create free account
hub / github.com/BoomingTech/Piccolo / tickOneFrame

Method tickOneFrame

engine/source/runtime/engine.cpp:68–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66 }
67
68 bool PiccoloEngine::tickOneFrame(float delta_time)
69 {
70 logicalTick(delta_time);
71 calculateFPS(delta_time);
72
73 // single thread
74 // exchange data between logic and render contexts
75 g_runtime_global_context.m_render_system->swapLogicRenderData();
76
77 rendererTick(delta_time);
78
79#ifdef ENABLE_PHYSICS_DEBUG_RENDERER
80 g_runtime_global_context.m_physics_manager->renderPhysicsWorld(delta_time);
81#endif
82
83 g_runtime_global_context.m_window_system->pollEvents();
84
85
86 g_runtime_global_context.m_window_system->setTitle(
87 std::string("Piccolo - " + std::to_string(getFPS()) + " FPS").c_str());
88
89 const bool should_window_close = g_runtime_global_context.m_window_system->shouldClose();
90 return !should_window_close;
91 }
92
93 void PiccoloEngine::logicalTick(float delta_time)
94 {

Callers 1

runMethod · 0.80

Calls 7

renderPhysicsWorldMethod · 0.80
pollEventsMethod · 0.80
setTitleMethod · 0.80
shouldCloseMethod · 0.80
to_stringFunction · 0.50
swapLogicRenderDataMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected