int AG_InitGraphics (const char *drivers)
void AG_DestroyGraphics (void)
int AG_InitGUI (Uint flags)
void AG_DestroyGUI (void)
AG_InitGraphics() function initializes the Agar GUI system.
drivers argument is NULL (the usual case), Agar selects the "best" driver available
on the current platform.
drivers is non-NULL, it should be a comma-separated list of drivers in order of
Special selectors are available to include drivers based on capabilities.
"<OpenGL>" selects any driver with support for OpenGL 1.1 or later.
"<SDL>" any driver based on SDL 1.x and "<FB>" any driver based on a
The full list of compiled-in drivers may be obtained by calling
AG_ListDriverNames(3). Driver-specific parameters may be specified as a colon-separated list
enclosed in parentheses.
The available options are documented on the driver's respective manual page:
It is recommended that applications provide a way for the user to specify
alternate drivers, for example
agartest(1) accepts the
Op Fl d Ar agar-drivercommand-line arguments.
AG_DestroyGraphics() routine shuts down and releases all resources allocated by the Agar-GUI
AG_InitGUI() function initializes the Agar GUI system, but does not create a driver instance
The caller may invoke
AG_DriverOpen(3) to create one or more driver instances.
For example, an X11 application that can talk to multiple X11 servers might call
AG_DriverOpen() for each X11 connection.