[PLUG] gl graphics fault
Galen Seitz
galens at seitzassoc.com
Wed Sep 25 02:59:56 UTC 2002
todd.sarratt at attbi.com said:
> I am running an HP Omnibook2100 laptop with debian3.0. I am trying to
> draw lines on my screen. I can get vgadrawline() to work no problem.
> But I need to draw a lot of lines and the man pages indicate that
> gl_line is much quicker. However, anytime I execute a gl_xxx command
> that writes to the screen (gl_setpixel, gl_line, etc). I get this :
> svgalib: Signal 11: Segmentation fault received.
> The line right before my gl_line statement is
> vga_setpage(0);
> I don't really understand what this does, I haven't found very good
> documentation for it. I'm just of the impression that it's needed for
> gl_line. Commenting it out doesn't fix the problem, however...
Have you looked at the man page (man gl_line) ? It looks like you might
also need a call to gl_setcontextvga.
galen
from the gl_line man page:
DESCRIPTION
Draw a line from point (x1, y1) to (x2, y2) inclusively in
color c.
You should not assume that the same drawing trajectory is
used when you exchange start and end points.
To use this program one first sets up a mode with a regu
lar vga_setmode call and vga_setpage(0), with possibly a
vga_setlinearaddressing call. Then a call to gl_setcon
textvga(mode) is made. This makes the information about
the mode available to gl_line.
The pixels are placed directly into video memory using
inline coded commands.
More information about the PLUG
mailing list