Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
AG_DRIVERSDL2GL(3)	     Library Functions Manual	      AG_DRIVERSDL2GL(3)

NAME
     AG_DriverSDL2GL -- agar SDL2 OpenGL driver

DESCRIPTION
     The  Agar	sdl2gl	driver	provides  an interface to the Simple DirectMedia
     Layer (SDL) library version 2, and renders GUI elements  as  OpenGL  primi-
     tives and managed textures.

     Using  AG_InitVideoSDL(3)	as opposed to AG_InitGraphics(3), it is possible
     to attach Agar to an existing SDL display surface.  If the SDL surface  has
     the SDL_OPENGL flag set then sdl2gl will be auto-selected by default.

INHERITANCE HIERARCHY
     AG_Driver(3)-> AG_DriverSw(3)-> AG_DriverSDL2GL.

EXAMPLES
	   AG_InitGraphics("sdl2gl(width=640:height=480)");
	   AG_InitGraphics("sdl2gl(width=60%:height=80%)");
	   AG_InitGraphics("sdl2gl(bgColor=0/120/120)");
	   AG_InitGraphics("sdl2gl(out=%08d.jpg:jpegQual=100)");
	   AG_InitGraphics("sdl2gl(depth=64:stereo)");

	   AG_InitVideoSDL(an_existing_SDL_screen, 0);

OPTIONS
     ctrl	     Enable game controller (gamepad) support.
     haptic	     Enable haptic (force feedback) subsystem.
     joy	     Enable joystick input device support.
     width	     Width (in pixels, in % of total desktop or "auto").
     height	     Height (in pixels, in % of total desktop or "auto").
     bgColor	     Solid background color (in 8-bit "R/G/B" format).
     !bgPopup	     Disable  the  right-click	background popup menu (which in-
		     cludes, notably the list of active windows).
     clampOnResize   Whenever the display is resized, clamp  Agar  window  posi-
		     tions and sizes to fit the new display size.
     debug	     Capture GL_DEBUG_OUTPUT errors.
     depth	     Depth (in bits per pixel or "auto").
     fpsMax	     Limit refresh rate in frames/second (e.g., "60").
     out	     Export  video  frames  to	JPEG  or  PNG.	Specify a format
		     string for output file  names.   Example:	`%04d.jpg'  will
		     output frames to 0001.jpg, 0002.jpg, and so on.
     outFirst	     Override first frame number (default = 0).
     outLast	     Terminate after # frames have been rendered.
     jpegDCT	     (JPEG Export) DCT method ("islow", "ifast" or "float").
     jpegQual	     (JPEG Export) Quality factor (100% = best).
     stereo	     Request a stereoscopic visual.

SEE ALSO
     AG_DriverSDL2FB(3),   AG_DriverSDL2MW(3),	 AG_DriverSDLFB(3),  AG_DriverS-
     DLGL(3), AG_Driver(3), AG_DriverSw(3), AG_GL(3), AG_InitGraphics(3), AG_In-
     tro(3)

     Simple DirectMedia Layer
     OpenGL

HISTORY
     The sdl2gl driver first appeared in Agar 1.7.0.  The  clampOnResize  option
     appeared in Agar 1.7.0.

Agar 1.7			December 23, 2022	      AG_DRIVERSDL2GL(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=AG_DriverSDL2GL&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>

home | help