Trait physx::physics::ProfilerCallback
source · [−]pub unsafe trait ProfilerCallback: Sized {
unsafe extern "C" fn zone_start(
name: *const i8,
detached: bool,
context_id: u64,
user_data: *const c_void
) -> *mut c_void;
unsafe extern "C" fn zone_end(
context: *const c_void,
name: *const i8,
detached: bool,
context_id: u64,
user_data: *const c_void
);
unsafe fn into_px(self) -> *mut PxProfilerCallback { ... }
}
Expand description
A trait for creating profiler callbacks for PhysX.
Required Methods
sourceunsafe extern "C" fn zone_start(
name: *const i8,
detached: bool,
context_id: u64,
user_data: *const c_void
) -> *mut c_void
unsafe extern "C" fn zone_start(
name: *const i8,
detached: bool,
context_id: u64,
user_data: *const c_void
) -> *mut c_void
Safety
The name is a static string. If detached, consider threading support of your allocators. Not all support cross-thread events.
sourceunsafe extern "C" fn zone_end(
context: *const c_void,
name: *const i8,
detached: bool,
context_id: u64,
user_data: *const c_void
)
unsafe extern "C" fn zone_end(
context: *const c_void,
name: *const i8,
detached: bool,
context_id: u64,
user_data: *const c_void
)
Safety
The name is a static string. If detached, consider threading support of your allocators. Not all support
cross-thread events. Context is the value return from ProfilerCallback::zone_start
.
Provided Methods
sourceunsafe fn into_px(self) -> *mut PxProfilerCallback
unsafe fn into_px(self) -> *mut PxProfilerCallback
Safety
Do not override this method.