Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
Bitmap/Shapes vs meshes — Gideros Forum

Bitmap/Shapes vs meshes

MellsMells Guru
edited November 2013 in General questions
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?
twitter@TheWindApps Artful applications : The Wind Forest. #art #japan #apps

Comments

  • ar2rsawseenar2rsawseen Maintainer
    Accepted Answer
    I'd say the most advantage you might have from Mesh is to use a single mesh, instead of multiple Shapes or Bitmaps.
    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

    +1 -1 (+1 / -0 )Share on Facebook
  • MellsMells Guru
    edited November 2013
    I see. But are bitmaps and shapes just simple and rectangular meshes under the hood?
    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.


    twitter@TheWindApps Artful applications : The Wind Forest. #art #japan #apps
  • Under the hood each Bitmap is basically a Mesh with two triangles forming a rectangle.

    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.
  • @ar2rsawseen thanks again.
    twitter@TheWindApps Artful applications : The Wind Forest. #art #japan #apps
Sign In or Register to comment.