engine_frame ()
Renders the next frame.
This function can be repeatedly called in the main loop of an application.
Returns:
0 when sys_exit was called during rendering;
otherwise nonzero.
Remarks:
- Can only be called from an external application, not from a script or
plugin.
- The engine must be opened before a frame can be rendered.
- The video device is opened during the first engine_frame() call.
Initial video settings must be set before.
Example:
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <stdlib.h>
#include "adll.h"
int APIENTRY WinMain(HINSTANCE hInstance, // application instance handle
HINSTANCE hPrevInstance, // always zero
LPTSTR lpCmdLine, // application command line
int nCmdShow) // window flags
{
engine_open("arena.wmb");
while (engine_frame());
engine_close();
return 0;
}
See also:
engine_open,
engine_status, sys_exit ► latest
version online