Skip to main content

ss_scene_create

Function ss_scene_create 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn ss_scene_create( desc: *const SsSceneDesc, ) -> *mut SsScene
Expand description

Create a scene that renders into the window described by desc.

Returns null on failure; call ss_last_error for the reason. The window (and its layer, on macOS) must stay alive until ss_scene_destroy.

A scene holds no player of its own — add them with ss_scene_create_player, as many as the window should show.

§Safety

desc must point at a valid ss_scene_desc_t whose window handle is live and matches its kind. On macOS this must be called from the main thread.