DEKI/ENGINE ドキュメント
マニュアル API リファレンス
deki-sdl3-integration 0.40.1
Deki パッケージリファレンス
deki-sdl3-integration

SDL3(3.2.8)によるデスクトップ向けのディスプレイ、入力、ファイルシステム。

リポジトリ: github.com/dekiengine/deki-sdl3-integration · 最新リリース: 0.40.0 · エンジン 0.40.0 以降が必要 · 依存: deki-input

DekiEditor --packages-add deki-sdl3-integration <project> か、パッケージマネージャーからインストールします。エンジン自身のコンポーネントと C++ API は Deki のドキュメントにあります。

エディターでは SDL3 Integration と表示されます。

コンポーネント

コンポーネント カテゴリ 説明
SDL3DisplaySetup SDL3 ゲームの描画先となるデスクトップのウィンドウを開きます。
SDL3InputSetup SDL3 デスクトップのキーボード、マウス、ゲームパッドの入力をエンジンに渡します。

機能フラグ

ビルドから外せる部分です。define を持つ機能はその define で切り替わり、それ以外はコンポーネントと一緒に取り除かれます。

機能 define デフォルト
Display — オン
Input — オン

コンポーネントリファレンス

SDL3DisplaySetup

ゲームの描画先となるデスクトップのウィンドウを開きます。

インスペクターでの名前: SDL3 ディスプレイセットアップ · カテゴリ: SDL3 · 型: DekiSdl3::SDL3DisplaySetup

プロパティ 型 デフォルト 制約 説明
windowScale int32 2 1 から 8 画面の 1 ピクセルをウィンドウの何ピクセルで表示するかです。画面のサイズはターゲットプラットフォームのものです。
presentThroughOpenGL bool true プラットフォームに OpenGL があれば、フレームを OpenGL で表示します。フレームは GPU 上で組み立てられ、3D は読み戻されずに直接そこへ描かれます。2D をレイヤーで合成できるよう、フレームバッファーはプラットフォームの画面フォーマットにかかわらず RGB565A8 になります。オフのとき、または OpenGL がないときは、SDL の GPU API がフレームバッファーをそのまま表示します。
draw2DOnGpu bool true OpenGL で表示するとき、2D も GPU で描画します。スプライト、テキスト、図形がフレームに直接描かれ、CPU はピクセルを描きません。オフにすると、デバイスと同じように 2D を CPU で描いてフレームバッファーをアップロードします。オンのときフレームバッファーにはコードが直接書き込んだものしか入らないため、そのスクリーンショットには 2D が写りません。

SDL3InputSetup

デスクトップのキーボード、マウス、ゲームパッドの入力をエンジンに渡します。

インスペクターでの名前: SDL3 入力セットアップ · カテゴリ: SDL3 · 型: DekiSdl3::SDL3InputSetup

プロパティ 型 デフォルト 説明
enableKeyboard bool true キーボード入力を有効にします
enableMouse bool true マウス/ポインター入力を有効にします
enableGamepad bool true ゲームパッドを、携帯ゲーム機のボタンが送るのと同じキーとして読み取ります。D-pad と左スティックは矢印キー、A と Start は Enter、B は Esc、X は Space、Y は Tab、Back は Backspace、LB と RB は Q と E、LT と RT は Z と C です。イベントは入力ソース "Gamepad" から届きます。

変更履歴

変更履歴は英語です。

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.

それ以前のリリース: CHANGELOG.md


パッケージのリフレクションデータから生成しています (エンジン 0.40.1)。プロパティ名はシーンファイルで使われるキーです。名前を変えても別名が残ります (互換性)。