[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: [LI] Graphics using C programming under linux



I tried and got the msg as
Cannot find EGA and VGA graphics device.

venu@xxxxxxxx wrote:
> 
> svgalib is the way to go for console graphics. For graphics under X, of
> course, you have any number of options, from Xlib to the various wrapper
> toolkits (GTK, Qt, Xt, Motif, etc). Of course, there is the GGI option
> also available. Sample program using svgalib:
> 
> #include<vga.h>
> main(int argc,char *argv[])
> {
>         vga_init();
>         vga_setmode(4); /* Safe to assume that at least this will work.
> Use lower modes if not */
>         vga_drawline(0,0,30,30);        /* Draw a line from 0,0 (upper
> left) to 30,30 */
>         vga_getch(); /* pause and wait for the user to press a key */
>         vga_setmode(TEXT); /* Restore text mode */
> }
> 
> Compile this passing the -lvga flag to the compiler. An important point is
> that the program has to be executed as root, or as seteuid root in order
> to work. After this, try man svgalib to get the man pages on svga, and you
> are on your way.
> 
>                                                         yours,
>                                                         venu

-- 
L.V.Gandhi
MECON, 5th Floor, RTC Complex, Visakhapatnam AP 530020 INDIA
http://www.poboxes.com/lvgandhi  lvgandhi@xxxxxxxxxxx, 
lvgandhi@xxxxxxxx,  31882656@xxxxxxxxxxxxxxxxxxx


--------------------------------------------------------------------
The Linux India Mailing List Archives are now available.  Please search
the archive at http://lists.linux-india.org/ before posting your question
to avoid repetition and save bandwidth.