> x = GGI_RP_DONTCARE;
> y = GGI_RP_SYNC;

As brian said, it is wise to reset the values before each call. However
a few extra words about how to get stuff flicker-free:

> while (pos_x < width) {
>    /* clear screen to default color */
>    ggiSetGCForeground(vis, ggiMapColor(vis, &col));
>    ggiFillscreen(vis);

Don't do that, if it can be avoided. Filling the whole screen may take some
time and might thus cause flicker.

>    draw_cross(vis, pos_x, pos_y, fcol);
>    ggiWaitRayPos(vis, &x, &y);
>    ggiFlush(vis);

Not a good sequence. Better is:

ggiWaitRayPos(vis, &x, &y);
draw_whatever();
ggiFlush();

This ensures the drawing takes place while the ray is retracing. Other
method depends on being inside a tight loop.

CU, Andy

-- 
= Andreas Beck                    |  Email :  <[EMAIL PROTECTED]>             =

Reply via email to