Home -> WindowInfoSDL3 -> Initialize

Description

The Initialize method detects the SDL video driver and stores the corresponding platform-specific binding structure.

ImportantImportant

On macOS, WindowInfoSDL3::Initialize must be called from a module compiled as Objective-C++, because SDL exposes the Cocoa window object and the helper must access its content view.

ImportantImportant

On Linux with both Xlib and XCB support compiled in, the SDL helper selects Xlib for the SDL x11 video driver because the Xlib branch is tested first.

Usage

bool Initialize(cobalt::logging::ILogger* log, SDL_Window* sdlWindow, const V2UInt32& windowSize);

Argument list

log [cobalt::logging::ILogger*]
The logger used for unsupported-driver error messages.
sdlWindow [SDL_Window*]
The SDL window to inspect.
windowSize [const V2UInt32&]
The drawable window size in pixels.

Return value

[bool]
true if a supported platform binding structure was created; otherwise false.

See also