DEKI/ENGINE docs
manual api reference
Deki 0.40.1
Modular C++ engine with a visual editor, for 2D and 3D
Loading...
Searching...
No Matches
API reference
Every class in the engine and the editor, from the code.

Start here

Engine

AllocContextWho asked for an allocation, filled in by the compiler AssetLookupTableMaps "path:type" keys to asset GUIDs with a binary search and no heap allocation AssetManagerLoads, caches and frees assets, by path or GUID AssetPackReaderFinds which pack file holds an asset and loads pack files into memory AssetRefTyped asset reference: use it like a T* AssetRefBaseThe untyped part of AssetRef, so the asset system can reach guid and ptr without knowing T AutoSetupRegistrarRegisters an auto SetupComponent from a static initializer BufferOwning array of T, freed when it goes out of scope ColorAn RGBA colour, 8 bits per channel, with conversions to and from packed formats (RGB565, RGB888, ARGB8888, RGBA8888), floats and HSV ComponentThe base class of every component ComponentFactoryCreates components by type id and tells which class an id belongs to ComponentMetaComponent metadata for runtime reflection ComponentRegistryComponent metadata and field tables, by type id and, in the editor, by name ComponentsMigrationRegistrarRegisters a components migration on construction and removes it on destruction ComponentTypeInfoEverything the engine knows about one component class CoreProjectSettingsThe Core section of the project settings: FPS cap and target frame rate DPackEntryOne asset in a pack file's table: GUID, type name, offset and size DPackHeaderHeader at the start of a pack file EngineEngine singleton: owns the scene system, lifecycle and frame loop Engine::FrameTimingsHow long the parts of a frame took, in milliseconds of the engine's clock: update (input, lifecycle, update callbacks), render and present EngineHostHow the engine is hosted EngineSettingsEngine settings, loaded from the project config FieldRefCompact field descriptor, the one piece of reflection on every platform FileImageRead-only pack of a game's files in one block of bytes, used where it lies FileImage::FileOne file to pack: its name in the image and its bytes FileSystemHolds the process-wide filesystems FPSCounterMeasures the frame rate the engine reaches, averaged over recent frames HostFileSystemThe file system of a game that runs as a program on an operating system HostMemoryProviderMemory provider over the C heap (malloc/free), for any host with a normal C library heap: the editor, desktop and simulator builds, tests ICameraCamera interface for coordinate conversion IClipProviderInterface of a component whose clip rectangle the 2D renderer applies while drawing it IDisplayWhat a display package implements: setup, presenting frames, events and UI overlays IFileSystemWhat a filesystem package implements: file operations, path conversion and USB storage mode IInputSystemThe input system as the engine sees it, so it need not link to the implementation in the input package DLL IMemoryProviderThe platform's memory, as the engine sees it, so the engine has no platform-specific allocation code: a microcontroller with external RAM uses its SDK's capability allocator, a part without it or a desktop uses malloc IPackageWhat a hardware peripheral package (SD card, GPS, WiFi, ...) implements IPowerDevice power management (sleep and wake) IPower::SleepInfoThe sleep mode a driver is in, with its platform name for diagnostics IRenderSystemThe render system as the engine sees it, so it need not link to the implementation in the rendering package DLL ISortableProviderInterface of a component whose object the 2D renderer sorts by GetSortingOrder() ITimeProviderThe platform's millisecond clock, such as SDL_GetTicks() on SDL3 or esp_timer_get_time() / 1000 on ESP32 LoadedPackA pack file loaded into memory LoadedPack::AssetInfoOne asset in a loaded pack: its bytes and type name LogSystemBackend of the DEKI_LOG macros, with a callback for the editor console Mat44x4 matrix in the layout OpenGL/GLSL expect: column-major, m[col][row] MemoryThe engine's memory, in named regions Memory::RegionWhere an allocation lives MemorySiteOne place in the code that allocates through the engine, and what it holds MemoryStatsBytes allocated through the engine right now, in total and by memory region NodeRefReference from one node-graph node to another in the same graph, by its id ObjectA node in the scene: a name, components, children and, in most builds, a transform ObjectRefAn object reference the user assigns in the editor ObjectRefBaseThe type-erased part of ObjectRef, which the engine uses PackageConfigRuntime configuration of one hardware package on a board: pin assignments (GPIO numbers) and string settings, loaded from the platform JSON PackIndexEntryOne pack_index.bin entry: which pack file holds an asset PlatformSetupComponentRuns the boot scene's SetupComponents (such as SDCardComponent) one at a time, in order, waiting for each to finish, then loads the startup scene PowerHolds the active power driver; GetCurrent() is nullptr when none is registered ProjectSettings::DisplaySettingsDisplay section of project_data.bin, after the FileHeader ProjectSettings::FileHeaderHeader at the start of project_data.bin ProjectSettings::RuntimeSettingsRuntime section of project_data.bin: target frame rate and startup scene PropertyBindingA resolved PropertyRef: where the field lives and what it is PropertyInfoProperty metadata, one per component type and field PropertyRefA picked field of a component on an object RectA half-open pixel rectangle: right and bottom are excluded SceneA scene: objects with components, and Deki's basic unit of content SceneFormat::SceneMsgPackParserMessagePack parser for compiled scene files, made for embedded targets: it allocates nothing and its recursion depth is capped (kMaxDepth) SceneFormat::SceneMsgPackWriterWrites a scene in the compiled MessagePack format (editor only) SceneSystemLoads and owns the root scene, the scene that is running, and keeps the persistent objects that outlive scene changes ScreenAnchorKeeps its object at a point on the screen, such as the top-left corner, on every screen size and while the camera moves SettingsRegistryRegistry of project-settings types, which packages can add to SettingsTypeInfoOne registered project-settings type and its live instance SetupComponentBase class for components that need asynchronous setup at boot Texture2DAn image: width, height, format, pixels and its .dtex file header Texture2D::HeaderHeader of a texture file. The file is [Header][pixel data][metadata] TimeThe engine's clock, independent of the platform UnitProjectSettingsThe Units section of the project settings: inspector units and world scale VectorGrowable array of T whose growth can fail Vector22D vector for positions, directions and scales Vector33D vector for positions, directions, scales and rotations

Editor

AssetCacheContextEverything a cache handler needs to write the cache files for one asset AssetDataWhat an asset's .data sidecar file holds: its GUID and its import settings as JSON, keyed by type name AssetDatabaseStatic asset import and GUID lookup for editor tools, like Unity's AssetDatabase AssetExportContextWhat an asset export encoder is given AssetExportTargetThe target an asset is stored for: a platform and its screen's format AssetFileWatcherOS file watcher that feeds AssetPipeline::Tick() AssetFileWatcher::EventOne file change under a watched folder AssetInfoA discovered asset AssetPickerAsset picker popup AssetPickerEntryOne row in the asset picker: an asset, or a frame of a spritesheet AssetPipelineThe asset import pipeline, like Unity's: finds assets, gives them GUIDs and compiles them into the cache AssetTypeEditorAn asset type a package adds: its file extensions, compile step and inspector UI AssetTypeEditorRegistryThe registered AssetTypeEditors, looked up by type name AssetTypeHandlerHow the editor creates, compiles and inspects one asset type AssetTypeRegistryThe asset types and file extension categories the editor knows AtlasFrameOne frame in atlas mode BuilderDefinitionA build backend's toolchain definition, parsed from JSON BuilderRegistryThe available firmware builders: the backends packages and plugins contribute, plus builder DLL plugins loaded from ~/.deki-editor/builders/ BuildOptionsOptions a build backend takes: logging, and whether to build for the simulator BuildProgressState, status text and progress of a running build BuildStripSettingsA project's choices for stripping unused features and packages from device builds ChromaKeySettingsOptional chroma-key transparency for a texture CliToolA tool a package adds to the editor's command line and MCP server CliToolContextWhat a package's CLI tool may use of the running editor CMakeGen::ExecutableCMakeOptionsWhat a build backend chooses for a game built as one ordinary executable CMakeGen::ExecutableLibraryA third-party library the executable links, as CMake text the backend writes: the backend resolved it (a prebuilt archive, a source checkout), so only it knows how it is found CMakeGen::FeatureEntryOne entry of a package's "features": a compile definition the package brings, the component types it provides, and whether it may be left out CMakeGen::FrameworkDependencyOne thing a package needs from a build framework, from package.json: "dependencies": { "<framework id>": [ "bare-name", { "name": "...", ... } ] } CommandAn undoable edit CommandHistoryThe undo/redo history. Commands that arrive close together can merge ComponentDefOne toolchain component: where it installs, how it is detected and updated ComponentUsageWhich component types a project uses, and where each one was seen CompoundCommandSeveral commands undone and redone as one CreateMenuEntryAn item in the hierarchy's right-click "Create Object" menu, registered by a package CreateMenuRegistryThe items packages add to the hierarchy's "Create Object" menu CustomEditorCustom editor for one component type, like Unity's CustomEditor: it can replace the component's Inspector UI and tell the scene view its size CustomEditorRegistryCreates and caches the CustomEditor for each component DeadMemoryMemory that is about to be freed, described as byte ranges DecodedImageDecoded image, RGBA8 packed (4 bytes per pixel) DeployTargetOne thing a build can be deployed to, as the backend enumerates them DeviceProfile DeviceProfileRowOne line of the report. Its values are per frame DialogButtonSpecOne button of SchematicDialogButtons: label, kind and whether it is enabled DownloadProgressState and progress of a toolchain download EditorApplicationThe editor's state as seen by EditorWindow and CustomEditor code, like Unity's static editor access: auto& app = EditorApplication::Get(); const char* projectPath = app.GetProjectPath(); Deki::Object* selected = app.GetActiveObject(); EditorAssetsLoads assets onto the GPU for the editor, cached by GUID: uint32_t texId = EditorAssets::Get()->LoadTexture(guid, &w, &h); Deki2D::BitmapFont* font = EditorAssets::Get()->GetBitmapFont(bakedGuid); EditorExtensionBase class of what packages add to the editor: custom editors, asset types, tools EditorHttpUtilsHTTP and archive helpers for the whole editor EditorHttpUtils::ArchiveLinkA symbolic link in an archive: its entry name and the path it points to, as the archive stores them EditorPathsWhere the editor keeps its files EditorSettingsThe editor's own settings, saved per user EditorSettings::PackageDepInfoAn external dependency listed in a package.json file EditorTexture::BackendWhat the editor draws textures with EditorUIThe editor's UI controls and inspector drawing, for CustomEditor code: auto& ui = EditorUI::Get(); ui.DrawDefaultInspector(); ui.PropertyField("speed"); EditorUI::EditCallbacksBytesEdit callbacks a WidgetBackend calls, with the values as raw bytes EditorUI::EnumCallbacksChange, undo and redo callbacks of an enum field or integer slider EditorUI::FloatCallbacksChange, undo and redo callbacks of a float field EditorUI::IntCallbacksChange, undo and redo callbacks of an integer field EditorUI::TextCallbacksChange, undo and redo callbacks of a text field EditorUI::VecCallbacksChange, undo and redo callbacks of a vector field, with values as float arrays EditorUI::WidgetBackendThe ImGui widget implementations, installed once by the editor executable EditorWindowBase class for standalone editor windows EditorWindowMetaA registered editor window: its title, menu path and factory FallbackDefThe pinned version and URL a toolchain component installs from FeatureDecisionWhether one package feature stays in a build, and why FileInspectorInspector for a native file type such as .ttf or .png FileInspectorRegistryThe registered FileInspectors, looked up by file extension FirmwareBuilderBaseShared base of build backends: build thread, progress and toolchain handling GuidCacheMaps asset paths to GUIDs, read from the .data sidecar files and cached in a JSON file IAssetImporterBase interface for asset importers IBuildActivitySinkWhere a build backend reports long-running work ImportResultOutcome of an asset import: success or error, and the cache file written IPlatformEditorUIA builder's own settings UI in the platform editor ITargetBuilderA build backend: everything the editor knows about one kind of target Localization::LanguageA language the editor offers: its code and its name in that language Localization::ScopedPackageWhile it lives, Tr and TrLabel look in package's own table first, so text a package's class shows (its component, property and enum names) reads as that package translates it even when the editor or another package translates the same English word differently: deki-fsm's "Add" (an arithmetic operation) is not the editor's "Add" button Motion::RowHoverList rows that ImGui draws (tree nodes, selectables) with a fading highlight NodeCanvasImmediate-mode node-graph widget with pan, zoom, nodes, pins and links NodeCanvasEventsWhat happened this frame. Every field is false or zero unless its event fired NodeCanvasLinkOne link to draw, by node ids and pin indices NodeCanvasNodeOne node to draw. Pin labels are for display; events report pin indices NodeCanvasPaletteCanvas colours, packed as EditorUI::Rgba does: a<<24 | b<<16 | g<<8 | r PackageDecisionWhether one package stays in a build, and why PickerItemOne entry in a SchematicPicker list PlatformConfigWhat the editor knows about a platform: its identity, the framework whose backend builds for it, that backend's settings (carried, not interpreted), its screen, compiler flags, what it offers packages and what it needs from them, and the scene it boots PlatformOriginStatusWhere an adopted platform came from and how it differs from that source PlatformRegistryThe available platforms, all loaded from JSON: the project's own, those its packages offer, and board packs PlatformSyncResultResult of updating or restoring a platform from its package PlatformTemplateA platform a package offers a project, found in its platforms folder PostInstallDefThe setup command to run after installing a toolchain component, per host OS SceneViewThe scene view's current render context, for gizmo code to read: SceneViewContextEverything BeginObject() needs to set up an object's gizmo context ShaderCompilerTranslates HLSL shaders to the GLSL an OpenGL device runs, through Slang ShaderCompileRequestOne shader stage to compile: HLSL source, entry point and defines ShaderStageTextOne stage, in both dialects SpriteFrameDataA sprite frame's pixel rect within its texture, registered by frame GUID and used for rendering SpriteSettingsOptional sprite metadata baked into the texture file StripPlanWhat a device build keeps and strips: features, packages, defines and source files SubAssetInfoAn item inside a parent asset, such as a sprite frame or a LOD level SubComponentDefOne archive downloaded and unpacked as part of a toolchain component TargetCardInfoOne card's header TargetContentConflictA component this target's own content uses, from a package this target cannot have TexDataA loaded TEX file TexHeaderTEX file header TextureImporterImports images into the texture cache, and reads and writes TEX files TextureSettingsAn image's storage and filter settings, with per-target overrides TextureTargetSettingsOne target's own values ToolchainComponentOne toolchain component as the Build panel shows it: status, versions and actions ToolchainComponentManagerManages a builder's toolchain components as its BuilderDefinition describes them: detects them, downloads and installs them, and checks for updates ToolchainVersionInfoResult of checking a toolchain for a newer version VersionCheckDefHow to find a toolchain component's latest version: a GitHub release or a fixed one