Robert Bragg <[email protected]> writes:

> Excerpts from Zajcev Evgeny's message of Tue Mar 01 13:47:41 +0000 2011:
>> Robert Bragg <[email protected]> writes:
>> 
>> [..]
>> 
>> > I think in some game engines it is true that framerate variation can
>> > have a severe impact on animations since some game engines actually
>> > update animations in step with the framerate with a fixed progression of
>> > game time. (E.g. you used to see this kind of thing with quake such that 
>> > animations could complete faster with a higher framerate)
>> 
>> Great feature to have in clutter is externally driven master-clock for
>> this kind of purposes!  Externally driven master clock is also
>> valueable when application is driven by another event loop
>> implementation, say libev.  This might be a quite tricky part
>> integrating glib's event loop into libev.
>
> Glib's main loop API is fairly flexible in this regard. You can manually
> iterate a GMainContext via g_main_context_iteration for instance and you
> can also replace the poll() function that glib uses internally when
> blocking for file descriptors using g_main_context_set_poll_func() which
> can be used to proxy those file descriptors into a different mainloop
> library.

yes, this way we do it for now, but unfortunately loosing a glib's
timer precision a little.

>
> One thing I'd like our master clock to support though is an external
> time source. For debugging purposes for example I'd like to run an app
> in half-time or less to slow animations down or if I want to record
> Clutter content to a video I wouldn't want Clutter to follow real world
> time and drop frames.

yes yes yes! exactly what we need!  We currently use ugly patched
version of master-clock to use external time source.  With this kind
of feature, it might be usefull to have master-clock individual to
stage as well.

BTW, i suspect a stylistic typo in clutter-master-clock.c:

   #define CLUTTER_MASTER_CLASS_GET_CLASS(obj)     (G_TYPE_INSTANCE_GET_CLASS 
((obj), CLUTTER_TYPE_MASTER_CLOCK, ClutterMasterClockClass))

   MASTER_CLASS -> MASTER_CLOCK

thanks!

- 
lg
_______________________________________________
clutter-app-devel-list mailing list
[email protected]
http://lists.clutter-project.org/listinfo/clutter-app-devel-list

Reply via email to