Skip to main content

ss_runtime_bind_resource

Function ss_runtime_bind_resource 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn ss_runtime_bind_resource( context: *mut c_void, resource: *mut c_void, ) -> bool
Expand description

Bind a resource to a context, which takes its own share of it. One resource can be bound to several contexts, and ss_resource_destroy is safe while they are: the resource lives until the last of them is destroyed, reset or bound to another. A _borrow resource’s buffer is the caller’s to keep alive for as long.

Drops the context’s tracks and overrides; ss_runtime_setup_animation comes next. Returns false with InvalidParameter for a null resource.