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

Function SetProfileUIMode

engine/profiler/src/profiler.cpp:513–527  ·  view source on GitHub ↗

sets the the on-screen profiler ui mode * Set the on-screen profile mode - run, pause, record or show peak frame * * @name profiler.set_ui_mode * @param mode [type:constant] the mode to set the ui profiler in * * - `profiler.MODE_RUN` This is default mode that continously shows the last frame * - `profiler.MODE_PAUSE` Pauses on the currently displayed frame * - `profiler.MODE_SHOW_PEAK_FRA

Source from the content-addressed store, hash-verified

511 * ```
512 */
513static int SetProfileUIMode(lua_State* L)
514{
515 DM_LUA_STACK_CHECK(L, 0);
516
517 if (!gRenderProfile)
518 {
519 return 0;
520 }
521
522 uint32_t mode = luaL_checknumber(L, 1);
523
524 dmProfileRender::SetMode(gRenderProfile, (dmProfileRender::ProfilerMode)mode);
525
526 return 0;
527}
528
529/*# sets the the on-screen profiler ui view mode
530 * Set the on-screen profile view mode - minimized or expanded

Callers

nothing calls this directly

Calls 2

luaL_checknumberFunction · 0.85
SetModeFunction · 0.85

Tested by

no test coverage detected