Re: [clutter] perspective

2008-09-25 Thread Peter Csaszar
Hi,

Thank you for the answer. I have studied several times the doc for
Unfortunately clutter_stage_set_perspective() and cogl_perspective().
May be I wasn't able to understand it or it is just not enough
descriptive . But I spent some time with experimenting it. I think these
functions are not appropriate for the trick I need.

Let's see it a bit more close:

void clutter_stage_set_perspective (ClutterStage *stage, gfloat fovy,
gfloat aspect, gfloat z_near, gfloat z_far);

Sets the stage perspective.
stage :
A ClutterStage
fovy :
the field of view angle, in degrees, in the y direction
aspect :
the aspect ratio that determines the field of view in the x direction.
The aspect ratio is the ratio of x (width) to y (height)
z_near :
the distance from the viewer to the near clipping plane (always 
positive)
z_far :
the distance from the viewer to the far clipping plane (always positive)


z_near, z_far and aspect is good as it is for me. fovy effectively
scales the viewport. This is not what I need.

cogl_perspective has the same parameter and thus it is also not what I
would need.

Thank you anyway,
Peter


Emmanuele Bassi írta:
> On Wed, 2008-09-24 at 17:17 +0200, Peter Csaszar wrote:
> 
>> Is there a way to change the perspective in clutter, even in cogl level?
> 
> you want to read the documentation for:
> 
>   clutter_stage_set_perspective ()
> 
> and, eventually:
> 
>   cogl_perspective ()
> 
>> The nicest would be to change it only for a given actor.
> 
> you can obviously only set the perspective on a per-stage basis, since
> the stage is the viewport.
> 
> ciao,
>  Emmanuele.
> 

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



[clutter] perspective

2008-09-24 Thread Peter Csaszar
Hi all,

Is there a way to change the perspective in clutter, even in cogl level?
I would need to change the far point. I don't know the real name of it
but I mean the one that is by default something like: (stage.width/2 ,
stage.height/2, zfar).

Is it possible at all to change it some way to for example (stage.width
* 0.75 , stage.height/2, zfar) ?

The nicest would be to change it only for a given actor.

I am not sure whether this is possible even at gl level, but this would
help me a lot.

Thanks,
Peter
-- 
To unsubscribe send a mail to [EMAIL PROTECTED]



[clutter] clutter_actor_destroy

2008-06-18 Thread Peter Csaszar
Hi,

By the way, I found that clutter_actor_destroy calls
clutter_actor_unparent only if the parent is a container. If the parent
is just an other actor (so it is a composite one) clutter_actor_unparent
is not called on the child. However g_object_dipose is called in both case.

Is this intensional? I am just worry about to call dispose on an actor
we are still using as child of other. Or we just should not use
clutter_actor_destroy for actors in use by some parent actor? Or may be
I missed something?

Br,
Peter Csaszar







smime.p7s
Description: S/MIME Cryptographic Signature


[clutter] clutter_actor_transform_stage_point gives bad coordinates

2008-06-11 Thread Peter Csaszar
Hi,

I have found myself in a problem I have no idea how to solve. Could
someone please help me on this?

The next code :

g_debug("Received event coordinates: %d,%d", event->x, event->y);
x = y = 0;
if(!clutter_actor_transform_stage_point(CLUTTER_ACTOR(self), event->x,
event->y, &x, &y)) return FALSE;
g_debug("Transformed event coordinates: %d,%d", x, y);

Gives me the next result:

DEBUG - button_press_event_cb
DEBUG - Received event coordinates: 148,96
DEBUG - Transformed event coordinates: -7339486,-4194487

It is absolutely sure I am pointing to a right place. It might have some
meaning that the actor s rotated and it's depth is incremented by some
value.

Regards,
Peter, Csaszar


smime.p7s
Description: S/MIME Cryptographic Signature