|
From: Alexey B. <bav...@ma...> - 2007-08-27 19:12:53
|
Hello, Peter.
27 =E0=E2=E3=F3=F1=F2=E0 2007 =E3., 9:28:33 you wrote:
> Hi..
> I'm tring to make somekinds real-time animation with agg..
> Demo programs in agg seems to use 'idle' time to draw something.
> It's good for demo but insufficient for real-animation program.
> I have run maxim's 'particle_demo2.exe' it's amazingly fast..!!
> I wonder how can I implement such a nice animation in win32 ??
> I have tried below ways..
> it's runned in separated thread..
> while(1)
> {
> draw with agg
> sleep (1)
> }
> it seems work..but animation is not smooth and quite slow..
> Please give me some clue for smooth animation.//
you must pre-render a few frames of your animation in memory buffer
and then, blend (or just copy it to screen).
in "particle_demo" there are 2 ways of animate: cached & not cached.
not cached animation renders each object in every frame - it's slow
enough. but cached version - renders objects to the memory buffers,
and then just blends them out to screen - very fast! )
that's all! ))
|