Agar

<-- Back to AG_Intro.3

DESCRIPTION

The Agar sdl2gl driver provides an interface to the Simple DirectMedia Layer (SDL) library version 2, and renders GUI elements as OpenGL primitives 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:outFirst=10)");
AG_InitGraphics("sdl2gl(depth=64:stereo)");

AG_InitVideoSDL(an_existing_SDL_screen, 0);

OPTIONS

debugCapture GL_DEBUG_OUTPUT errors.
stereoRequest a stereoscopic visual.
widthWidth in pixels, in % of available desktop space, or "auto".
heightHeight in pixels, in % of available desktop space, or "auto".
depthDepth in bits per pixel, or "auto".
fpsMaxLimit GUI refresh rate in frames/second (default = 60fps).
outDump video frames to JPEG or PNG image files. The filename path may include a printf-style (with frame number as argument). For example, %08d.jpg will output frames to 00000001.jpg, 00000002.jpg, etc.
outFirstOverride first frame number (default = 0).
outLastTerminate application after # frames have been rendered.
bgColorSolid background color specified as "R/G/B", from "0/0/0" (black) to "255/255/255" (white).
!bgPopupDisable the right-click background popup menu (which includes, notably the list of active windows).
jpegQualIf exporting to JPEG, set quality factor (100% = best).
jpegDCTIf exporting to JPEG, specify DCT method ("islow" for slow but accurate integer method, "ifast" for fast but less accurate integer method, or "float" for floating point method).

SEE ALSO

AG_DriverSDL2FB(3), AG_DriverSDL2MW(3), AG_DriverSDLFB(3), AG_DriverSDLGL(3), AG_Driver(3), AG_DriverSw(3), AG_GL(3), AG_InitGraphics(3), AG_Intro(3)

Lk https://libsdl.org/ Simple_DirectMedia_Layer

Lk https://www.opengl.org/ OpenGL

HISTORY

The sdl2gl driver first appeared in Agar 1.7.0.
Csoft.net ElectronTubeStore