|
libultraship
Reimplementations of libultra (N64 SDK) functions for modern hardware
|
SDL2 implementation of the Fast3D window/input backend. More...
#include <gfx_sdl.h>
Public Member Functions | |
| GfxWindowBackendSDL2 (std::shared_ptr< Ship::Config > config=nullptr, std::shared_ptr< Ship::FileDrop > fileDrop=nullptr, std::shared_ptr< Ship::ConsoleVariable > consoleVariable=nullptr, std::shared_ptr< Fast::Fast3dGui > fast3dGui=nullptr) | |
| Constructs the backend with optional shared engine dependencies. | |
| ~GfxWindowBackendSDL2 () override | |
GfxWindowBackend implementation | |
| void | Init (const char *gameName, const char *apiName, bool startFullScreen, uint32_t width, uint32_t height, int32_t posX, int32_t posY) override |
| void | Close () override |
| void | SetKeyboardCallbacks (bool(*onKeyDown)(int scancode), bool(*onKeyUp)(int scancode), void(*onAllKeysUp)()) override |
| void | SetMouseCallbacks (bool(*onMouseButtonDown)(int btn), bool(*onMouseButtonUp)(int btn)) override |
| void | SetFullscreenChangedCallback (void(*onFullscreenChanged)(bool is_now_fullscreen)) override |
| void | SetFullscreen (bool fullscreen) override |
| void | GetActiveWindowRefreshRate (uint32_t *refreshRate) override |
| void | SetCursorVisibility (bool visability) override |
| void | SetMousePos (int32_t posX, int32_t posY) override |
| void | GetMousePos (int32_t *x, int32_t *y) override |
| void | GetMouseDelta (int32_t *x, int32_t *y) override |
| void | GetMouseWheel (float *x, float *y) override |
| bool | GetMouseState (uint32_t btn) override |
| void | SetMouseCapture (bool capture) override |
| bool | IsMouseCaptured () override |
| void | GetDimensions (uint32_t *width, uint32_t *height, int32_t *posX, int32_t *posY) override |
| void | SetDimensions (uint32_t width, uint32_t height, int32_t posX, int32_t posY) override |
| Ship::WindowRect | GetPrimaryMonitorRect () override |
| void | HandleEvents () override |
| bool | IsFrameReady () override |
| void | SwapBuffersBegin () override |
| void | SwapBuffersEnd () override |
| double | GetTime () override |
| int | GetTargetFps () |
| void | SetTargetFps (int fps) override |
| void | SetMaxFrameLatency (int latency) override |
| const char * | GetKeyName (int scancode) override |
| bool | CanDisableVsync () override |
| bool | IsRunning () override |
| void | Destroy () override |
| bool | IsFullscreen () override |
Public Member Functions inherited from Fast::GfxWindowBackend | |
| virtual | ~GfxWindowBackend ()=default |
Additional Inherited Members | |
Protected Attributes inherited from Fast::GfxWindowBackend | |
| void(* | mOnFullscreenChanged )(bool isNowFullscreen) |
| bool(* | mOnKeyDown )(int scancode) |
| bool(* | mOnKeyUp )(int scancode) |
| bool(* | mOnMouseButtonDown )(int btn) |
| bool(* | mOnMouseButtonUp )(int btn) |
| uint32_t | mTargetFps = 60 |
| bool | mFullScreen |
| bool | mIsRunning = true |
| bool | mVsyncEnabled = true |
SDL2 implementation of the Fast3D window/input backend.
Handles window creation, input polling, fullscreen transitions, framerate pacing, and callback forwarding to the renderer/runtime.
| Fast::GfxWindowBackendSDL2::GfxWindowBackendSDL2 | ( | std::shared_ptr< Ship::Config > | config = nullptr, |
| std::shared_ptr< Ship::FileDrop > | fileDrop = nullptr, |
||
| std::shared_ptr< Ship::ConsoleVariable > | consoleVariable = nullptr, |
||
| std::shared_ptr< Fast::Fast3dGui > | fast3dGui = nullptr |
||
| ) |
Constructs the backend with optional shared engine dependencies.
|
override |
|
overridevirtual |
Implements Fast::GfxWindowBackend.
|
overridevirtual |
Implements Fast::GfxWindowBackend.
|
overridevirtual |
Implements Fast::GfxWindowBackend.
|
overridevirtual |
Implements Fast::GfxWindowBackend.
|
overridevirtual |
Implements Fast::GfxWindowBackend.
|
overridevirtual |
Implements Fast::GfxWindowBackend.
|
overridevirtual |
Implements Fast::GfxWindowBackend.
|
overridevirtual |
Implements Fast::GfxWindowBackend.
|
overridevirtual |
Implements Fast::GfxWindowBackend.
|
overridevirtual |
Implements Fast::GfxWindowBackend.
|
overridevirtual |
Implements Fast::GfxWindowBackend.
|
virtual |
Implements Fast::GfxWindowBackend.
|
overridevirtual |
Implements Fast::GfxWindowBackend.
|
overridevirtual |
Implements Fast::GfxWindowBackend.
|
overridevirtual |
Implements Fast::GfxWindowBackend.
|
overridevirtual |
Implements Fast::GfxWindowBackend.
|
overridevirtual |
Implements Fast::GfxWindowBackend.
|
overridevirtual |
Implements Fast::GfxWindowBackend.
|
overridevirtual |
Implements Fast::GfxWindowBackend.
|
overridevirtual |
Implements Fast::GfxWindowBackend.
|
overridevirtual |
Implements Fast::GfxWindowBackend.
|
overridevirtual |
Implements Fast::GfxWindowBackend.
|
overridevirtual |
Implements Fast::GfxWindowBackend.
|
overridevirtual |
Implements Fast::GfxWindowBackend.
|
overridevirtual |
Implements Fast::GfxWindowBackend.
|
overridevirtual |
Implements Fast::GfxWindowBackend.
|
overridevirtual |
Implements Fast::GfxWindowBackend.
|
overridevirtual |
Implements Fast::GfxWindowBackend.
|
overridevirtual |
Implements Fast::GfxWindowBackend.
|
overridevirtual |
Implements Fast::GfxWindowBackend.
|
overridevirtual |
Implements Fast::GfxWindowBackend.