What does bbSetBlitz3DEventCallback do?

Blitz3D SDK Forums/Blitz3D SDK Programming/What does bbSetBlitz3DEventCallback do?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

In PureBasic a debug callback routine could look like this:
Procedure MyDebugHandler(msg$)
  MessageRequester("My World Has Collapsed!", "Error: "+msg$)
  bbEndBlitz3D()
  End
EndProcedure

And it is invoked like this:
bbSetBlitz3DDebugCallback(@MyDebugHandler())

The Blitz3D SDK documentation implies that the call to bbEndBlitz3D() can be omitted from the callback routine, but in practice it seems to be needed. The actual wording is:
The Blitz3D runtime is closed before the error handler is invoked by the Blitz3DSDK