GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
AG_INITGRAPHICS(3) FreeBSD Library Functions Manual AG_INITGRAPHICS(3)

AG_InitGraphics
agar graphics initialization

#include <agar/core.h>
#include <agar/gui.h>

After having initialized the Agar-Core library with AG_InitCore(3), Agar-GUI applications must initialize the GUI system and select a driver.

As of Agar-1.5.0, the driver modules included in the distribution are:

glx
Native X11 interface (GL); see AG_DriverGLX(3).
wgl
Native Microsoft Windows interface (GL); see AG_DriverWGL(3).
cocoa
Native MacOS X Cocoa interface (GL); see AG_DriverCocoa(3).
sdlfb
SDL 1.x interface (framebuffer); see AG_DriverSDLFB(3).
sdlgl
SDL 1.x interface (GL); see AG_DriverSDLGL(3).

int
AG_InitGraphics(const char *drivers);


void
AG_DestroyGraphics(void);


int
AG_InitGUI(Uint flags);


void
AG_DestroyGUI(void);

The AG_InitGraphics() function initializes the Agar GUI system. If the drivers argument is NULL (the usual case), Agar selects the "best" driver available on the current platform. If drivers is non-NULL, it should be a comma-separated list of drivers, in order of preference (the special strings "<OpenGL>" and "<SDL>" may be used to select any driver with GL or SDL capability). The list of compiled-in drivers may be obtained by calling AG_ListDriverNames(3). Driver-specific parameters (which are documented on the driver's respective manual page) may be specified as a colon-separated list between parentheses:

	sdlfb,sdlgl(width=640:height=480:depth=32)
	<OpenGL>(stereo=1)
	<SDL>(width=640:height=480:depth=32)

The AG_DestroyGraphics() routine shuts down and releases all resources allocated by the Agar-GUI library.

The AG_InitGUI() routine provides an alternative to AG_InitGraphics(), which does not create any driver instance on initialization. While AG_InitGraphics() is limited to a single Agar driver instance, specialized applications may need to create multiple driver instances (e.g., an Agar application using X11 may establish multiple connections to multiple X servers). This may be done by calling AG_InitGUI(), and creating one or more driver instances with AG_DriverOpen(3).

AG_Core(3), AG_CustomEventLoop(3), AG_Driver(3), AG_EventLoop(3), AG_InitVideoSDL(3), AG_Intro(3)

OpenGL

Simple DirectMedia Layer

Apple Developer: Cocoa Frameworks

Microsoft Developer Network

The AG_InitVideo() function first appeared in Agar 1.0, and was replaced by AG_InitGraphics() in Agar 1.4.
April 18, 2010 FreeBSD 13.1-RELEASE

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.