SVGALib
SVGAlib was an open-source low-level graphics library which ran on Linux and FreeBSD and allowed programs to change video mode and display full-screen graphics. Some popular games like Quake and Doom have been ported to use SVGAlib.
Original author(s) | Harm Hanemaayer |
---|---|
Stable release | 1.4.3
/ June 2, 2001 |
Preview release | 1.9.25
|
Written in | C |
Operating system | Linux, FreeBSD |
Platform | x86, x86-64 |
Type | Library |
Website | www |
History
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.
Sample
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;
}
gollark: Yep.
gollark: And it says this:> This policy supersedes any applicable federal, national, state, and local laws, regulations and ordinances, international treaties, legal agreements, illegal agreements, or any other agreements that would otherwise apply.
gollark: That is not what the policy says.
gollark: The privacy policy says so.
gollark: Nope. Not only would that be part of series 7, which does not exist, but potatOS is nonanomalous.
See also
External links
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.