Box2D
Safe HaskellNone
LanguageGHC2021

Box2D.Recording

Synopsis

Documentation

create Source #

Arguments

:: Int
byteCapacity
-> IO (Ptr Recording) 

Create a recording buffer. The buffer grows on demand. @p byteCapacity pre-sizes it to avoid reallocations during a known-length session. Pass 0 for a small default.

Returns: A recording handle, freed with b2DestroyRecording

Binds b2CreateRecording.

destroy :: Ptr Recording -> IO () Source #

Destroy a recording buffer and free its memory.

Binds b2DestroyRecording.

getData :: Ptr Recording -> IO (Ptr Word8) Source #

Get a pointer to the recorded bytes, for saving to a file or transmitting. Valid until the next recording call or b2DestroyRecording.

Binds b2Recording_GetData.

getSize :: Ptr Recording -> IO Int Source #

Get the number of recorded bytes.

Binds b2Recording_GetSize.