Method b3RecPlayer_SetDebugShapeCallbacks
- Namespace
- Box3D.Native
- Assembly
- Box3D.NET.Native.dll
b3RecPlayer_SetDebugShapeCallbacks(b3RecPlayer*, delegate* unmanaged[Cdecl]<b3DebugShape*, void*, void*>, delegate* unmanaged[Cdecl]<void*, void*, void>, void*)
Wire host debug-shape callbacks into the player's replay world so a renderer can build per-shape draw resources (the 3D sample needs this or the replay world draws nothing). Rebuilds the current world under the new callbacks and rewinds to frame 0, so call it once right after b3RecPlayer_Create and re-read the world id afterward. The callbacks persist across Restart and backward seeks, which recreate the world internally.
public static extern void b3RecPlayer_SetDebugShapeCallbacks(b3RecPlayer* player, delegate* unmanaged[Cdecl]<b3DebugShape*, void*, void*> createDebugShape, delegate* unmanaged[Cdecl]<void*, void*, void> destroyDebugShape, void* context)Parameters
playerb3RecPlayer*-
the player to configure
createDebugShapedelegate* unmanaged[Cdecl]<b3DebugShape*, void*, void*>-
called when a replayed shape is added; returns a user draw handle
destroyDebugShapedelegate* unmanaged[Cdecl]<void*, void*, void>-
called when a replayed shape is removed; may be NULL
contextvoid*-
user context passed to both callbacks