Function ul_next_sys::ulCreateBuffer
source · pub unsafe extern "C" fn ulCreateBuffer(
data: *mut c_void,
size: usize,
user_data: *mut c_void,
destruction_callback: ulDestroyBufferCallback
) -> ULBuffer
Expand description
Create a Buffer from existing, user-owned data without any copies. An optional, user-supplied callback will be called to deallocate data upon destruction.
@param data A pointer to the data.
@param size Size of the data in bytes.
@param user_data Optional user data that will be passed to destruction_callback when the returned Buffer is destroyed.
@param destruction_callback Optional callback that will be called upon destruction. Pass a null pointer if you don’t want to be informed of destruction.