RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Debug DrawingGPU Mesh StructsImGui FFIMath Structs (FFI)FFI C DefinitionsPID ControllersCSV LibraryDelay LineDequeDevelopment UtilitiesEvent ReferenceExtension SystemSignal FiltersGraph PathfindingUI BridgeInput Filter Constants2D Bilinear InterpolationIntrospectionJBeam Pretty PrinterJSON AST ParserSJSON ParserJSON Debug ParserJSON Pretty PrinterK-D Tree (2D Boxes)K-D Tree (3D)K-D Tree (3D)Lua SerializerC++/Lua BindingLua CoreLua ProfilerMath LibraryParticlesQuadtreeSettingsTCP ServerTimer SchedulerUtility Library
extensions/ - BeamNG Extension Modules
ImGui Base APIImGui Custom BindingsImGui Auto BindingsImGui ContextImGui WidgetsImGui Wire ProtocolImGui Profiler

UI

Resources

BeamNG Game Engine Lua Cheat SheetGE Developer RecipesMCP Server Setup

// RLS.STUDIOS=true

Premium Mods for BeamNG.drive. Career systems, custom vehicles, and immersive gameplay experiences.

Index

HomeProjectsPatreon

Socials

DiscordPatreon (RLS)Patreon (Vehicles)

© 2026 RLS Studios. All rights reserved.

Modding since 2024

API Referencecommonextensionsui

ImGui Profiler

Module defined in `lua/common/extensions/ui/improfiler.lua`. ImGui-based LuaJIT profiler visualization - renders profiling data as an in-game overlay using ImGui.

Module defined in lua/common/extensions/ui/improfiler.lua. ImGui-based LuaJIT profiler visualization - renders profiling data as an in-game overlay using ImGui.


Exports

Functions

M.onUpdate(dtReal, dtSim, dtRaw)

Hook: Called each frame. Collects profiler samples and renders the profiler UI.

  • Parameters:
    • dtReal - number - Real delta time
    • dtSim - number - Simulation delta time
    • dtRaw - number - Raw delta time

Hooks

  • onUpdate

Internal Notes

  • Built on jit.profile for low-overhead sampling
  • prof_cb - profiler callback, accumulates per-function sample counts
  • prof_top - sorts and displays top-N hottest functions
  • prof_annotate - overlays sample counts on source code
  • prof_start(mode) - starts profiling with given mode flags
  • prof_finish() - stops profiling and prepares results for display
  • Uses jit.vmdef (from libs/LuaJIT/vmdef) for VM state names
  • Similar to jit.p but renders results in ImGui instead of text output

See Also

  • ui/imgui Reference - Related reference
  • ui/imguiUtils Reference - Related reference
  • ui/imguiWire Reference - Related reference
  • Common Libraries Overview - Guide

ImGui Wire Protocol

Module defined in `lua/common/extensions/ui/imguiWire.lua`. ImGui wire protocol - serializes ImGui draw commands into a buffer for remote/deferred execution. Enables ImGui rendering across process bou

Flowgraph Lua Bindings

Module defined in `lua/common/extensions/ui/flowgraph/editor_api_luaintf.lua`. Lua bindings for the flowgraph node editor C++ API (`Engine.fge`). Provides ID types, enum constants, and editor control

On this page

ExportsFunctionsM.onUpdate(dtReal, dtSim, dtRaw)HooksInternal NotesSee Also