On Sun, 2012-05-13 at 11:11 +1000, Amy C wrote: > > Clutter.CloneTexture doesn't exist in Clutter, and unless it's something > > from Clutter < 1.0, I don't think it ever existed. This must be > > something specific to the binding you're using. > > > > If you want to avoid loading the texture more than once, you can do that > > by using Cogl at first to create a Cogl texture, then create a bunch of > > empty ClutterTexture and set the Cogl texture on each of the > > ClutterTexture. This way the Cogl texture is shared amongst the actors > > you've created. > > > > Hope that answers your question. > > > > -- > > Lionel > > Hi Lionel, > > Thanks for your reply, this seems like a good way to go. However I'm > using the gobject introspection bindings for clutter/cogl/etc, and on > examining the Cogl-1.0.gir file I notice that > `Cogl.Texture.new_from_file` is not introspectable, i.e. I don't seem > to be able to create a texture from a file. > > What about loading the texture once in a Clutter.Texture & then making > a whole bunch of Clutter.Clones of that? Would that work in the same > way? (I saw some documentation for Clutter.TextureClone in the <1.0 > interfaces and a bunch of examples too, but I assumed it had been > depreciated since I couldn't find it in the 1.10 documentation. I > assume its replacement is Clutter.Clone).
Clones are slightly different, instead of having a reference to the underlaying CoglTexture, they have a reference on the ClutterActor they're created from. In your case, I guess that shouldn't be a problem. Regarding your binding problem, one thing you could try is creating a ClutterTexture then use the set_from_file() method on this first actor, and get the CoglTexture using get_cogl_texture on this. You should be able to create new textures and call set_cogl_texture on them. -- Lionel _______________________________________________ clutter-app-devel-list mailing list clutter-app-devel-list@clutter-project.org http://lists.clutter-project.org/listinfo/clutter-app-devel-list