I’m trying to code a simple display program that updates images at least
10 times per second.
I’m coding this myself because I need something easy that allows opening
multiple windows per process.
I use XPutImage to put the image on the screen.
My problem: I’m getting image flickering.
I’ve had this happen when I tried using FLTK for displaying.
I tried making calls with XSync, but that doesn’t appear to help.
I tried using multiple memory buffers where I would copy to one while
previous XPutImage was working on the other.
I tried using the X Double Buffer Extension for my display, but it
doesn’t seem to help either.
I was hoping there was some blocking mechanism to wait until the image
is completely drawn, but couldn’t find one.
I’ve used SDL for displaying frames of up to 30 per second without any
flicker.
How does it prevent this flickering?
Thanks,
~ Philip D.S. Thoren–
:vsplit vimrulez.txt i vimrulez :w :q
I’ve used SDL for displaying frames of up to 30 per second without any
flicker.
How does it prevent this flickering?
You could use the XV extension which for some graphic cards
prevents the flicker for you.
Otherwise have a look at this page:
http://www.complang.tuwien.ac.at/skral/eyefriendly_xfree86.html
Thomas
Thomas Jarosch wrote:
I’ve used SDL for displaying frames of up to 30 per second without any
flicker.
How does it prevent this flickering?
You could use the XV extension which for some graphic cards
prevents the flicker for you.
Otherwise have a look at this page:
http://www.complang.tuwien.ac.at/skral/eyefriendly_xfree86.html
Thomas
Thanks for the info. I tried them out but to no avail (except learning
something new:).
The Xv extension could be useful if I was just grabbing and displaying
images from a video device to the screen.
I have a stream of still images being brought into the software very
fast and want to put them on the screen as fast as they can be rendered.
I tried out the “eye friendly” link (which explains the use of XF86
VidMode extension) and it didn’t help the flickering.
The examples provided at that link also flicker.
After reading the info on that site, I’m assuming it’s a lack of support
for that feature in my video card/driver: nv_drv.
Still searching for how SDL manages to prevent the flickering on my system.
I’m looking into DGA (I see there is Xv, dga, vm stuff in
src/video/XFree86);
Just have to find some DGA examples now.
Thanks,
Philip D.S. Thoren–
:vsplit vimrulez.txt i vimrulez :w :q