MCPcopy Create free account
hub / github.com/defold/defold / EngineUpdate

Function EngineUpdate

engine/graphics/src/test/test_app_graphics.cpp:866–898  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

864}
865
866static UpdateResult EngineUpdate(void* _engine)
867{
868 EngineCtx* engine = (EngineCtx*)_engine;
869 engine->m_WasRun++;
870 uint64_t t = dmTime::GetMonotonicTime();
871 /*
872 float elapsed = (t - engine->m_TimeStart) / 1000000.0f;
873 if (elapsed > 3.0f)
874 return RESULT_EXIT;
875 */
876
877 if (!engine->m_Running)
878 {
879 return RESULT_EXIT;
880 }
881
882 dmPlatform::PollEvents(engine->m_Window);
883
884 if (engine->m_WindowClosed)
885 {
886 return RESULT_EXIT;
887 }
888
889 JobSystemUpdate(engine->m_JobContext, 0);
890
891 dmGraphics::BeginFrame(engine->m_GraphicsContext);
892
893 engine->m_Test->Execute(engine);
894
895 dmGraphics::Flip(engine->m_GraphicsContext);
896
897 return RESULT_OK;
898}
899
900static void EngineGetResult(void* _engine, int* run_action, int* exit_code, int* argc, char*** argv)
901{

Callers

nothing calls this directly

Calls 6

JobSystemUpdateFunction · 0.85
BeginFrameFunction · 0.85
GetMonotonicTimeFunction · 0.50
PollEventsFunction · 0.50
FlipFunction · 0.50
ExecuteMethod · 0.45

Tested by

no test coverage detected