Re: urgent newbie question



simith nambiar wrote:
> hi list,
>          I am trying to draw RGB images on to the
> window, iam grabbing a frame once and displaying it in
> the expose event handler, this is ok when i do it for
> the first time , but what if i need to do it
> continiously ?
>    is there any method i can use? so that i can grab
> frames and display them repeatedly maybe each second.

Set up a once per second timer with gtk_timeout_add(), in the callback 
grab a new frame to your image buffer and queue a repaint, in the expose 
handler, paint the image buffer to the screen.

There are fancier techniques if you want a very high frame rate ... but 
this should work ok, certainly up to 10 fps on most machines.



========================================================== 
Fabric of Vision 
Dress and Drapery in Painting 

19 June - 8 September 2002 

For information and tickets: 
http://www.nationalgallery.org.uk/exhibitions/fabric/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]