SVGALib
Kàu tō-lám
跳至搜尋
| 原作者 | Harm Hanemaayer |
|---|---|
| 眼前版本 | 1.4.3(2001年6月2日) |
| 預覽版本 | 1.9.25 |
| 源代碼庫 |
|
| 編程言語 | C |
| ia̋n-jín | |
| 作業系統 | Linux, FreeBSD |
| 平台 | x86, x86-64 |
| 分類 | 庫 |
| 容允協議 | |
| 網站 | www |
Svgalib是一套運轉佇Linux佮Free BSD下的開放原始碼低坎繪圖函式庫,伊准程式設計人員變更視訊模式佮全螢幕圖像,真濟熱門的電腦遊戲如Quake佮Doom攏源自這技術。
Svgalib佇1990年代中期開始並遍,毋過到2000年了後,多數使用此技術的應用攏漸次移轉到X11 and SDL(Simple Direct Media Layer)頂面。
本函式庫足容易使用的,會當參考以下程式範例片段:
<syntaxhighlight lang="c">
- 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;
} </syntaxhighlight>