Re: [clutter] Considering Clutter for Toonloop

2010-07-29 Thread Alexandre Quessy
Hello Emmanuele and everyone,

2010/7/28 Emmanuele Bassi eba...@linux.intel.com:
 I'm currently out of office to a conference, so I'm going to answer very
 quickly...


Thanks for replying so quickly! You are much dedicated, as we can see
on the IRC and the mailing list. :)

 On Tue, 2010-07-27 at 10:21 -0400, Alexandre Quessy wrote:
 2) My second requirement, is that we can set the actor (the plane on
 which we draw the texture) can be automatically resized when the
 window is resized. (the units are in pixels in Clutter, which is not
 what I am used with) I know this is possible in Clutter.

 it's possible. you can set the stage to be resizable and then use
 notification on allocation changes. in Clutter 1.4 there will be a
 ClutterBindConstraint and a ClutterAlignConstraint which allows to match
 position/size and align actors depending on normalized (0.0 → 1.0)
 values.

These will only be in version 1.4: I see. I'll find a way, meanwhile,
peeking in the code of those new tools.

 4) Fourth requirement: be able to use shaders with two textures fed to
 it. The idea is to blend two images together using the overlay mode.
 (the live input + the animation playback) That's what I am not sure at
 all about.

 ClutterShader allows that - just create a ClutterTexture, get the
 CoglMaterial out of it and set two CoglTextures as two separate material
 layers. the layer number is also the texture sampler id.

It's nice that the library provides tools to do that. There are many
project which need that.

 the interactive test suite has a lot of code that deals with the API;
 some high level GL concepts are mapped in an object oriented way, but
 they are relatively the same.

Yes, there will be plenty of stuff to dig into. Of course, it's always
possible to dig and play in the guts of low-level OpenGL stuff.

Thanks again!

-- 
Alexandre Quessy
http://alexandre.quessy.net/
--
To unsubscribe send a mail to clutter+unsubscr...@o-hand.com



Re: [clutter] Considering Clutter for Toonloop

2010-07-28 Thread Emmanuele Bassi
hi;

I'm currently out of office to a conference, so I'm going to answer very
quickly...

On Tue, 2010-07-27 at 10:21 -0400, Alexandre Quessy wrote:

 1) My first requirement is that we can set the texture data using a
 pointer to char*, like in
 http://github.com/aalex/proto-toonloop/blob/proto-gtkglext/src/gui.cpp
 on line 368. (that's where the interesting Toonloop development is
 hidden these days!)

ClutterTexture has the API to do exactly that:

• clutter_texture_set_from_rgb_data()
http://docs.clutter-project.org/docs/clutter/stable/ClutterTexture.html#clutter-texture-set-from-rgb-data

• clutter_texture_set_area_from_rgb_data() 
http://docs.clutter-project.org/docs/clutter/stable/ClutterTexture.html#clutter-texture-set-area-from-rgb-data

 2) My second requirement, is that we can set the actor (the plane on
 which we draw the texture) can be automatically resized when the
 window is resized. (the units are in pixels in Clutter, which is not
 what I am used with) I know this is possible in Clutter.

it's possible. you can set the stage to be resizable and then use
notification on allocation changes. in Clutter 1.4 there will be a
ClutterBindConstraint and a ClutterAlignConstraint which allows to match
position/size and align actors depending on normalized (0.0 → 1.0)
values.

 3) Third requirement: be able to resize the window, make it
 fullscreen, embed it in GTK+. Should be OK too in Clutter.

true. clutter-gtk is the library that allows that.

 4) Fourth requirement: be able to use shaders with two textures fed to
 it. The idea is to blend two images together using the overlay mode.
 (the live input + the animation playback) That's what I am not sure at
 all about.

ClutterShader allows that - just create a ClutterTexture, get the
CoglMaterial out of it and set two CoglTextures as two separate material
layers. the layer number is also the texture sampler id.

 So far, GtkGlExt meets them all. For Clutter, they are probably all
 possible too, but it's not so obvious. The good point for Clutter, is
 that using GLSL shaders is quite easy with it. It wraps the low-level
 OpenGL calls in an elegant manner.

the interactive test suite has a lot of code that deals with the API;
some high level GL concepts are mapped in an object oriented way, but
they are relatively the same.

ciao,
 Emmanuele.

-- 
Emmanuele Bassi, Open Source Software Engineer
Intel Open Source Technology Center

-- 
To unsubscribe send a mail to clutter+unsubscr...@o-hand.com



[clutter] Considering Clutter for Toonloop

2010-07-27 Thread Alexandre Quessy
Hello!

I am considering Clutter (v/s GtkGlExt) for the OpenGL scene in the
next version of Toonloop. (1.9)
Toonloop is a live animation software that is free, and a lot of fun
to play with.

Below are my four requirement for an OpenGL engine. I am trying to
improve my Clutter prototype, but I find the documentation rather
scarce. Before I choose to simply use GtkGlExt (and maybe regret it
later when I need higher-level functionnality), I tought I would ask
here if anyone has some examples/prototypes for one of the
requirements that are listed above.

1) My first requirement is that we can set the texture data using a
pointer to char*, like in
http://github.com/aalex/proto-toonloop/blob/proto-gtkglext/src/gui.cpp
on line 368. (that's where the interesting Toonloop development is
hidden these days!)

2) My second requirement, is that we can set the actor (the plane on
which we draw the texture) can be automatically resized when the
window is resized. (the units are in pixels in Clutter, which is not
what I am used with) I know this is possible in Clutter.

3) Third requirement: be able to resize the window, make it
fullscreen, embed it in GTK+. Should be OK too in Clutter.

4) Fourth requirement: be able to use shaders with two textures fed to
it. The idea is to blend two images together using the overlay mode.
(the live input + the animation playback) That's what I am not sure at
all about.

So far, GtkGlExt meets them all. For Clutter, they are probably all
possible too, but it's not so obvious. The good point for Clutter, is
that using GLSL shaders is quite easy with it. It wraps the low-level
OpenGL calls in an elegant manner.

Thanks!
--
Alexandre Quessy
http://alexandre.quessy.net/
-- 
To unsubscribe send a mail to clutter+unsubscr...@o-hand.com