Skip to main content

ss_player_texture_at

Function ss_player_texture_at 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn ss_player_texture_at( handle: *mut SsPlayer, pack_name: *const c_char, index: u32, out: *mut SsTextureRef, ) -> i32
Expand description

Describe the index-th atlas of a registered pack, so a reference-mode host knows what to load and where the exporter put it.

This is the half of texture supply only the .ssab can answer, and it is the same shape the sibling players expose: register the pack, walk this list, and for every entry whose embedded is false read <directory the .ssab came from>/<path> and hand it to ss_scene_add_texture_png. Embedded entries need no call at all.

pack_name null selects the main pack. Writes out and returns SS_OK, or leaves it untouched and reports the reason.

ยงSafety

pack_name must be null or a NUL-terminated UTF-8 string, and out must point at a writable ss_texture_ref_t.