A betray pluigin can set a number of plugins in order to influence how betray works


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 frame


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.


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.


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.