generally. most of application's hierarchical structure is
stage - app - window - view - widget1 - widget2 - widget3 ....[widget n].
and stage, app, window, view, widget inherite from ClutterGroup.

but if stage, app, window, view, widget inherite from ClutterGroup. this
could make some problem. please see clutter_group_paint function.
for example.
(1) clutter_group_paint (stage) -> cogl_push_matrix
->clutter_actor_paint (app)
(2) clutter_group_paint (app) -> cogl_push_matrix-> clutter_actor_paint
(window)
(3) clutter_group_paint (window) -> cogl_push_matrix->
clutter_actor_paint (view)
(4) clutter_group_paint (view) -> cogl_push_matrix-> clutter_actor_paint
(widget)
(5) clutter_group_paint (widget 0) -> cogl_push_matrix->
clutter_actor_paint (widget1)
...
(n) clutter_group_paint (widget n) -> cogl_push_matrix->
clutter_actor_paint (widget n+1)
like this! clutter_group_paint is called recursively by parent. and
cogl_push_matrix function is called continuously without calling
cogl_pop_matix ().
so When i run clutter in target board that have
GL_MAX_MODELVIEW_STACK_DEPTH is 16. I saw stack over flow error!

Question !!
(1) should I make app. window, view not to inherited from ClutterGroup?
(2) Is there solution to avoid stack overflow error?

thank you!
==========================================================
static void clutter_group_paint (ClutterActor *actor)
{
ClutterGroupPrivate *priv = CLUTTER_GROUP (actor)->priv;
GList *child_item;

cogl_push_matrix ();
for (child_item = priv->children;
child_item != NULL;
child_item = child_item->next)
{
ClutterActor *child = child_item->data;
g_assert (child != NULL);
if (CLUTTER_ACTOR_IS_VISIBLE (child))
clutter_actor_paint (child);
}
cogl_pop_matrix ();
CLUTTER_NOTE (PAINT, "ClutterGroup paint leave");
}
=================================================================



-- 
To unsubscribe send a mail to [EMAIL PROTECTED]

Reply via email to