When meshes were introduced we talked about the speed advantage of using meshes.
I am thinking about converting all my objects using bitmap and shapes to objects using meshes to see if there is a speed gain.
Is that a wise thing to do?
What are the tradeoffs?
If there are not, in what case would we use bitmaps and shapes at all?
Comments
So instead of having many different objects added to the stage, you have one single object.
Which mostly could be useful for cases like this:
http://www.giderosmobile.com/forum/discussion/1887/improve-performnace-with-mesh#Item_8
The disadvantage is that you would need a good triangulation algorithm to represent raw Shapes (or do calculations your self) or for example, the fact, that you can't transform/rotate each triangle separately, only the whole Mesh object.
Likes: Mells
Did the Mesh api basically give use access to the same internals that are used to build bitmaps?
I understand that if I wanted to keep the ability to manipulate meshes like I actually do with bitmaps, I would need to use 10 mesh objects instead of only one to display 10 "images" (which some would say defeats the purpose.. "but").
This leads me to the exact same situation as using bitmaps.
So back to using 10 meshes vs using 10 bitmaps :
- basically if I am using meshes do I get a speed gain?
- in that specific situation, are there any tradeoffs that you would advise me to use bitmaps or textured shapes instead?
- would you rather use meshes yourself, or bitmaps/shapes?
@atilim > I would also like to get your advice on it please.
Will using 10 Meshes be faster than Bitmap? Probably a little bit, as most probably there are some more abstraction to Bitmap, that adds additional functionality, and using Mesh without it, would be as using lower api (thus faster), but then again you won't have that additional functionality which was in Bitmap.
So bottom line, I would only use Meshes if I would need to make gradients, or I could manipulate all triangles in single Mesh.