|
From: Ben H. <be...@gl...> - 2007-08-27 08:26:50
|
You should think of the rendering and the animation as separate things.
The animation is the movement of the objects, and that should happen in
sync with real time (ie as measured from your system's clock- using
QueryPerformanceCounter/QueryPerformanceFrequency). The rendering on the
other hand, is simply the representation of that animation, and it
should happen as often as possible, but more than 60 times per second is
not very noticeable. Sleeping for a fixed amount of time is probably a
bad idea. If you have multiple threads, then the correct way to
communicate between them on win32 is to use Event objects. Look at
CreateEvent, WaitForSingleObject, SetEvent, etc.
Additionally, it might be useful to use WM_TIMER messages.
Ben=20
-----Original Message-----
From: vec...@li...
[mailto:vec...@li...] On Behalf Of
Peter
Sent: 27 August 2007 07:29 AM
To: vec...@li...
Subject: [AGG] Animation in win32 with AGG
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.//
------------------------------------------------------------------------
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Vector-agg-general mailing list
Vec...@li...
https://lists.sourceforge.net/lists/listinfo/vector-agg-general
|