Board index » delphi » SetVisualPage and flickering

SetVisualPage and flickering

hello,

for an application i use the graphics unit. I define two pages,
one is
visible through setvisualpage(0), while on the other
(setactivepage(1))
I draw a figure. When the figures are drawn, I switch pages such
that
the figure becomes visible in a flash (you need to do this if you
want
to record e.g. reaction times accurately). But each time the
swapping of
pages happens, some parts of the picture are seen somewhere on the
screen. So it seems that swapping does not work very well. What is
the
problem?
Thanks a lot,
Francis.

  Francis.Tuerlinckx.vcf
< 1K Download
 

Re:SetVisualPage and flickering


Francis Tuerlinckx wrote <375D76DE.325AE...@psy.kuleuven.ac.be> ...

After switching pages you must to wait until the monitor's vertical retrace
starts.
Like this:

  SetVisualPage(Page);
  SetActivePage(1-Page);
  While (Port[$3DA] and $08) <> 0 do;  {wait retrace}

Best regards.
Sergey Vasilchikov.

Quote
>But each time the
>swapping of
>pages happens, some parts of the picture are seen somewhere on the
>screen. So it seems that swapping does not work very well. What is
>the
>problem?

Re:SetVisualPage and flickering


Quote
Roman Smirnov wrote:
> Francis Tuerlinckx wrote <375D76DE.325AE...@psy.kuleuven.ac.be> ...

> After switching pages you must to wait until the monitor's vertical retrace
> starts.

Not necessarily! You only should not paint. If there are other things
left to do, it should be enough to put them between the switching and
the redraw.

--
Arno Fehm (af...@bigfoot.de)

------------------------------------------------------------------------
Member of Grey Dreams Design: visit http://GreyDreams.home.pages.de !!!!
He who can destroy a thing has the real control over it. (Frank Herbert)
------------------------------------------------------------------------

Other Threads