SVGAlib
| Aktualna wersja stabilna | 1.4.3 / 2 czerwca 2002; około 24 lat temu |
|---|---|
| Aktualna wersja testowa | 1.9.25 |
| Język programowania | C |
| System operacyjny | Linux, FreeBSD |
| Strona internetowa | |
SVGAlib – biblioteka niskopoziomowej grafiki stworzona przez Harma Hanemaayera na zasadach otwartego oprogramowania. Umożliwia ona programom na systemach Linux oraz FreeBSD na zmianę trybu wideo oraz na wyświetlanie grafiki w tekstowej konsoli w trybie pełnoekranowym[1][2]. Niektóre znane programy jak zgv[2] oraz gry, takie jak Quake[3] lub Quake 2[4] wykorzystują właśnie tą bibliotekę.
Poniżej znajduje się przykładowy kod źródłowy wykorzystujący bibliotekę SVGAlib.
#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;
/* wykrywanie chipsetu i nadawanie uprawnień administratora */
if (vga_init() < 0)
return EXIT_FAILURE;
vga_setmode(G320x200x256);
vga_setcolor(color);
vga_drawpixel(x, y);
sleep(seconds);
/* przywracanie trybu tekstowego i powrót do obsługi typowej tekstowej konsoli */
vga_setmode(TEXT);
return EXIT_SUCCESS;
}
Przypisy
- ↑ SVGAlib Tutorials. svgalib.org. [dostęp 2011-07-14]. (ang.).
- ↑ a b The Linux Gamers' How-To - 3.12. What is SVGAlib? Frame buffer? Console?. linux.about.com. [dostęp 2011-07-14]. (ang.).
- ↑ Linux Quake HOWTO: Quake/Quakeworld. oss.sgi.com. [dostęp 2011-07-14]. [zarchiwizowane z tego adresu (2013-09-29)]. (ang.).
- ↑ Linux Quake HOWTO: Quake II. linuxdocs.org. [dostęp 2011-07-14]. (ang.).
Linki zewnętrzne
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.