[Gtk-sharp-list] Drawing pixbufs to screen FAST..

Eto eto@shaw.ca
Thu, 06 Jan 2005 19:19:24 +0000

On January 5, 2005 07:11 pm, Dan Winship wrote:
> Are you sure you're actually drawing it to the screen? Have you read the
> bits of the gdk documentation about drawing and expose events and the
> like? The problem might be that you're not invalidating the window, so
> the drawing you do doesn't show up until some arbitrary time later.
> -- Dan

I'm fairly sure... hehe..  I am not measuring the speed visually though.  I 
have code that syncs to the desired speed, but this speed cannot be achieved 
(the actual code does not execute fast enough).   It does a thread sleep if 
it is going too fast, but does nothing if it's going too slow.  It never gets 
around to waiting, unless I choose a very slow animation speed.

I also measure the total time it takes to run the animation, which is longer 
than it should be.

It can be achieved fine in windows using SWF with the same back-end code..

I'm not sure exactly what documentation you refer to with regards to drawing 
and expose events.  As I mentioned, I'm not using expose/invalidate to update 
the screen while animating.  I have a background thread that does this.  I 
have tried making the thread invalidate the region to update then letting the 
expose event draw it, but it is equally as slow.. plus it also combines the 
regions to update, which is an undesired effect for the animation.  ):