[wxruby-users] Tearing in my buffered animation test script...
Jay McGavren
jay at mcgavren.com
Fri Mar 28 15:16:46 EDT 2008
Paul w Florczykowski wrote:
> I have tested your application, and indeed there is great
> deal of flicker as expected. You are not making any
> particular errors in your code; the problem occurs because
> the drawing, or more precisely, the copying of graphics
> (blit) is not synchronized with the vertical sync signal
> your screen receives from your graphics card. (I'm speaking
> in terms of analog signal CRT, but actually this applies to
> any kind of digital screen as well, as far the application
> is concerned)
Actually, Alex Fenton and Mario Steele helped me resolve most of my
flicker issues just by speeding up my drawing routine. On my Windows
box the flicker is no longer noticeable, even though I don't do a
vsync.
I think I posted a flicker-free version of the test script to this
list (check the archives), but if not you can check the source for my
main app (http://jay.mcgavren.com/zyps) to see what we're currently
doing.
> What you are currently doing is similar but lacks the point
> (2). wxRuby aims to support this on a lower level (i
> think). There is a method called "paint_buffered" (in stead
> of "paint") that provides a BufferedDC-object instead of
> ClientDC or DC.
> ...
> Sadly enough, this feature does not seem to be working
> properly with wxruby 1.9.5.
I heard from Alex at one point that paint_buffered was working in the
Subversion version, but I don't know if that's made it into a release
yet.
-Jay McGavren
http://jay.mcgavren.com/zyps
More information about the wxruby-users
mailing list