Re: vga_waitretrace()

Search this archive.

From: Tijs van Bakel (smoke@wanadoo.nl)
Date: Thu 31 May 2001 - 10:48:11 IDT


John McCutchan <ttb@tentacle.dhs.org> writes:

> Is there a more accurate way do this? When I use it i get a shaky screen
> from time to time. and when I don't I occasionally get a line going up
> the screen.

What do you mean with 'shaky'?  Do you mean that you miss a retrace
every now and then?  (ie, the framerate is not constant as you would
like it to be)  If so, you could schedule your program to use SCHED_RR.

  #include <sched.h>

  struct sched_param sp;
  sp.sched_priority = sched_get_priority_min (SCHED_RR);
  if (sched_setscheduler (0, SCHED_RR, &sp))
    fprintf (stderr, "could not set realtime scheduling.\n");


If with shaky you mean that the screen actually moves, then I have no
clue what is causing this.  In that case it would be interesting to
know what videocard you use.

Another approach to get rid of the tearing line is to use page
flipping.  Depending on which videomode you use this might be
preferable or not.


Hope this helps,

-- 
Tijs van Bakel, <smoke@wanadoo.nl>

------------------------------------------------------------------
Unsubscribe:  To:   listbot@svgalib.org
              Body: unsubscribe linux-svgalib


This archive was generated by hypermail 2.1.4 : Wed 21 Jan 2004 - 22:10:24 IST