Callbacks
A betray pluigin can set a number of plugins in order to influence how betray works
betray_plugin_callback_set_main
void betray_plugin_callback_set_main(void (*main_loop)(BInputState *input));
Description: Set a callback for the main loop. If set, the callback will be called once evbery framebetray_plugin_callback_set_view_vantage
void betray_plugin_callback_set_view_vantage(void (*vantage)(float *pos), boolean modify);
Description: Set a callback to update the vantage of the viewer to the screen. This can be used by tracking hardware to create a prespective correct display. If "Modify" is set the plugin will modify the vantage set by the application, if not itt will overwrite the vantage set by the application.betray_plugin_callback_set_view_direction
void betray_plugin_callback_set_view_direction(void (*matrix)(float *matrix));
Description: Set a callback to update the view direction 4X4 matrix. This is useful for hardware like headmounted displays.betray_plugin_callback_set_event_pump
void betray_plugin_callback_set_event_pump(uint event, boolean exclusive, void (*event_loop)(BInputState *input, HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam));
Description: Set a callback to give you access to windows event pump. Obviuslyu windows only.