DEKI/ENGINE docs
manual api reference
deki-sdl3-integration 0.40.1
Deki package reference
deki-sdl3-integration

SDL3 display, input, and filesystem integration

Repository: github.com/dekiengine/deki-sdl3-integration · Latest release: 0.40.0 · Needs engine 0.40.0+ · Requires: deki-input

Install with DekiEditor --packages-add deki-sdl3-integration <project>, or from the Package Manager. The engine's own components and C++ API are in the Deki docs.

Shown in the editor as SDL3 Integration.

Components

Component Category Description
SDL3DisplaySetup SDL3 Opens the desktop window the game renders into.
SDL3InputSetup SDL3 Feeds desktop keyboard, mouse and gamepad input to the engine.

Feature flags

Parts you can leave out of a build. A feature with a define is switched there; the rest are stripped with their components.

Feature Define Default
Display — on
Input — on

Component reference

SDL3DisplaySetup

Opens the desktop window the game renders into.

Inspector name: SDL3 Display Setup · Category: SDL3 · Type: DekiSdl3::SDL3DisplaySetup

Property Type Default Constraints Description
windowScale int32 2 1 to 8 How many window pixels show one screen pixel. The screen's size is the target platform's.
presentThroughOpenGL bool true Show frames through OpenGL where the platform has it. The frame is then built on the GPU, and 3D draws straight into it instead of being read back. The frame buffer becomes RGB565A8, whatever the platform's screen format, so 2D can be composed in layers. Off, or without OpenGL, SDL's GPU API shows the frame buffer as it is.
draw2DOnGpu bool true Presenting through OpenGL, draw the 2D on the GPU too: sprites, text and shapes go straight into the frame and the CPU draws no pixels. Off, the 2D is drawn on the CPU and the frame buffer uploaded, as on a device. The frame buffer then holds only what code writes into it directly, so a screenshot of it misses the 2D.

SDL3InputSetup

Feeds desktop keyboard, mouse and gamepad input to the engine.

Inspector name: SDL3 Input Setup · Category: SDL3 · Type: DekiSdl3::SDL3InputSetup

Property Type Default Description
enableKeyboard bool true Enable keyboard input
enableMouse bool true Enable mouse/pointer input
enableGamepad bool true Read gamepads as keys, the same keys a handheld's buttons send: D-pad and left stick are the arrows, A and Start Enter, B Esc, X Space, Y Tab, Back Backspace, LB and RB Q and E, LT and RT Z and C. Its events come from the input source "Gamepad".

Changelog

0.40.0

Changed

  • minEngine 0.40.0: built against engine 0.40.0. A build of this package from before does not load and is rebuilt.

Added

  • A gamepad's sticks are also read as sticks (DekiInput::GetStick): the one pushed furthest on any connected pad.
  • Gamepads. SDL3InputSetup reads every connected pad as keys, the same keys a handheld's buttons send: the D-pad and left stick are the arrows, A and Start Enter, B Esc, X Space, Y Tab, Back Backspace, LB and RB Q and E, LT and RT Z and C. Its events come from the source "Gamepad". Enable Gamepad turns it off.

0.30.0

Changed

  • minEngine 0.30.0: built against engine 0.30.0. A build of this package from before does not load and is rebuilt.

Declares the capabilities it uses

  • package.json has "capabilityDefines": ["opengl"]: its GL presenter tests DEKI_CAPABILITY_OPENGL. The editor reads them instead of knowing opengl itself; needs the editor from this release.

Added

  • SDL3GLDisplay: where the platform provides opengl, the window presents through OpenGL and deki-rendering's GLPresenter, so the frame is built on the GPU and deki-3d's meshes draw straight into it. SDL3DisplaySetup's presentThroughOpenGL (on by default) chooses it; SDL's GPU API remains the fallback.
  • SDL3DisplaySetup.draw2DOnGpu (on by default): presenting through OpenGL, the 2D is drawn on the GPU too, by the presenter, and the CPU draws no pixels. The frame buffer then holds only what code writes into it directly, so a screenshot of it misses the 2D; turn it off for that, or to see the 565 rounding a device's screen shows.

Earlier releases: CHANGELOG.md.


Generated from the package's reflection data (engine 0.40.1). Property names are the keys used in scene files. Renames keep an alias (compatibility).