Hi

Reuven Wachtfogel <[email protected]> writes:

> I am trying to port my app from clutter 0.9 to clutter 1.0. My app
> uses clutter-md2 which was working in 0.9 but not in 1.0.
>                                                                               
>                                                                
> I managed to get it to compile by adding these defines.                       
>                                                                
>                                                                               
>                                                                
> #define ClutterUnit gfloat                                                    
>                                                                
> #define CLUTTER_UNITS_FROM_INT(x) ((gfloat)x)                                 
>                                                                
>                                                                               
>                                                                
> My simple test program runs but no model is shown. Any ideas on where
> I should look for the problem? Anyone manage to use clutter-md2 in
> 1.0?

I've just pushed some patches to the git repo¹ to get it working with
Clutter 1.0. If you could check whether this fixes it for you that'd be
great.

The project still could do with a lot more work to update it properly
however. It's still using raw GL calls to render and this could be
avoided now that Cogl has the CoglVertexBuffer API. The rendering is
currently quite inefficient because the vertices are uploaded to GL at
every render and it uses multiple draw calls. It also defines a
ClutterBehaviourMD2 class which would not be neccessary if the
properties on ClutterMD2 were changed so that you could use the
clutter_actor_animate API.

You may be interested in a similar project² I started to load PLY files
instead of MD2. If your models are coming from Blender and you aren't
using the animation features of MD2 you may have better luck using that
library instead. It uses VBOs without any raw GL so it should be more
robust and also render faster. It is also somewhat more flexible because
it can render with any Cogl material rather than a fixed list of
skins. There was some discussion about this on the mailing list³.

I'd be very interested to know what your project is if you are able to
say :)

Hope that helps.

- Neil

¹ git clone git://github.com/bpeel/clutter-md2.git
² http://bugzilla.openedhand.com/show_bug.cgi?id=1983
³ http://lists.o-hand.com/clutter/3582.html
--
To unsubscribe send a mail to [email protected]

Reply via email to