Hello Clutter Team
I was looking for the implementation of eglCreatePixmapSurface for offscreen
rendering inside eglnative directory like it is present in glx .However it is
not there. Any plans to add it ?
I was trying to add offscreen support by calling eglCreatePixmapSurface instead
of eglCreateWindowSurface , whenever application makes the call
g_object_set (stage, "offscreen", TRUE, NULL); like in test-offscreen.c program
However I am noticing one thing in clutter code
Function clutter_stage_egl_realize in clutter-stage-egl.c is called only once
when
stage = clutter_stage_get_default (); is called in clutter application .
At this time offscreen is false by default and always eglCreateWindowSurface
will be called , by this the else statement in function
"clutter_stage_egl_realize" will never be called .
I had planned to modify the original else statement to include
eglCreatePixmapSurface in else condition , like it is done for glx backend.
Original code
else
{
g_warning ("EGL Backend does not yet support offscreen rendering\n");
CLUTTER_ACTOR_UNSET_FLAGS (actor, CLUTTER_ACTOR_REALIZED);
return;
}
Modified code
else
{
eglCreatePixmapSurface (backend_egl->edpy,
configs[0],
NULL,
NULL);
CLUTTER_ACTOR_UNSET_FLAGS (actor, CLUTTER_ACTOR_REALIZED);
return;
}
However it seems that since the function "clutter_stage_egl_realize" is
executed only once , always only the if condition will be executed when
application calls
stage = clutter_stage_get_default ();
after this if application calls
g_object_set (stage, "offscreen", TRUE, NULL);
only the set-property of stage is made offscreen=1 and this
clutter_stage_egl_realize is never invoked, so the else statement never gets
executed for non-offscreen(usual case) and off-screen.
Should I raise this as a bug?If so which is the best place to include
eglCreatePixmapSurface in clutter code
Regards
Dilip
Unlimited freedom, unlimited storage. Get it now, on
http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html/