SVGALib
From Encoresoup - The Ultimate Guide to Free/Open Source Software
|
| SVGALib | |
|---|---|
| Stable release |
1.4.3 ({{{3}}}) |
| Genre: | Library |
| Website: | http://www.svgalib.org/ |
SVGAlib is an open-source low-level graphics library which runs on Linux and FreeBSD and allows programs to change video mode and display full-screen graphics. Some popular games like Quake and Doom used it in their original releases.
The library was popular in mid-1990s. Toward 2000, many applications that used it migrated to X11 and SDL, which itself can make use of SVGAlib as a video driver.
A sample of SVGAlib code is shown below.
#include <stdlib.h> #include <unistd.h> #include <vga.h> int main(void) { int color = 4; int x = 10; int y = 10; unsigned int seconds = 5; /* detect the chipset and give up supervisor rights */ if (vga_init() < 0) return EXIT_FAILURE; vga_setmode(G320x200x256); vga_setcolor(color); vga_drawpixel(x, y); sleep(seconds); /* restore textmode and fall back to ordinary text console handling */ vga_setmode(TEXT); return EXIT_SUCCESS; }

![Anti-Gravity Globe! [ThinkGeek] Anti-Gravity Globe! [ThinkGeek]](http://www.ftjcfx.com/image-3067719-10356334?imgurl=http%3A//www.thinkgeek.com/images/products/front/antigravity_globe.jpg)
![Stargate Mirror - Comb your hair in the Event Horizon of your very own Stargate! [ThinkGeek] Stargate Mirror - Comb your hair in the Event Horizon of your very own Stargate! [ThinkGeek]](http://www.ftjcfx.com/image-3067719-10356334?imgurl=http%3A//www.thinkgeek.com/images/products/front/stargate_mirror.jpg)
![Linksys WRT600N Linksys Ultra RangePlus Dual-Band Wireless-N Gigabit Router with Storage Link [Amazon] Linksys WRT600N Linksys Ultra RangePlus Dual-Band Wireless-N Gigabit Router with Storage Link [Amazon]](http://openx.eclecticdave.com/images/41Q%2Bu9V4jWL._SL160_.jpg)

