Skip to main content

ss_scene_create_player

Function ss_scene_create_player 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn ss_scene_create_player( scene: *mut SsScene, ) -> *mut SsPlayer
Expand description

Add a player to scene and return its handle, or null if scene is null.

One scene draws any number of players, in ascending ss_player_set_order. They share the window’s device, renderer and atlas textures, so the second character of a pack costs no upload and no extra pipeline.

The handle stays valid until ss_player_destroy or ss_scene_destroy.

§Safety

scene must be a live handle or null.