When is Sprite better to use than mesh and texture?

I’m not sure of either pros and cons. Although I know meshes can be used with shaders, but I don’t know how to use shaders yet,

I think meshes are supposed to be better, but I’m not sure.

Meshes are more efficient (not least because sprites are meshes anyway), but sprites are easier to use for simple programs. Think of them as a quick and simple alternative to meshes.

Generally, sprites will be fine until you are drawing dozens of objects - if you see your frame speed dropping, that is a good time to use meshes!

Meshes are less laggy.

To make the most of 2D meshes, try to pack lots of objects onto one mesh using addRect setRect. If the objects sharing the same mesh have different textures, pack the textures into a single image (called a texture atlas). The fewer draw() calls you have, the better.

But until you have plenty of images, sprites should be OK.

I was wondering if some sort of sprite-to-mesh converter program could be written. It would need to do some source code analysis… and perhaps work in specific situations only, but it would be really cool if you could boost the frame rate of your struggling code from 5 back to 60 fps :slight_smile:
Just a random thought.

No, I think if you’re going to use meshes, it pays to learn how they work instead of getting a program to convert sprites for you.