Textureswitching, Spritesheets, Performance, Static 'sprites', TextureAtlas -- the graphics pipeline

Hi guys,

Can someone tell me some more about the graphicspipeline in corona?

How are textureswitches handled
How are multiple draw calls handled / buffered?

What I'd like to know is wether corona does smart textureswitching (no switching if it's not necessary), and wether draw calls with the same GL-state (texture etc) are buffered, so they result in only one GL call?

Also, I'd like to know how I am supposed to handle static images.
I would like my static images to come from a spritesheet (better name would be TextureAtlas)

IMO the naming of some of the classes is wrong..
A TextureAtlas would be a texture containing multiple textures to be reused by either sprites or static images.
Ideally, I'd like to see display.newImage(textureAtlas, "indexName"), which would return an object which would behave like a normal image.

This would also help against some weird stuff in ui.lua, where I see some ulgy hacks for retina displays.

I second that - I also have the feeling that the documentation is lacking in this respect (I mean, even the powers of 2 texture size implications aren't immediately obviously explained under the image docs), and that there must be performance gains to be made with a clear understanding of draw call structure. Perhaps a more 'tech under the hood' section of the documentation would be nice.

As a former cocos2d developer, I recommend ansca to take a look at how cocos2d has done some of the stuff.
It's really clear in terms of what happens, and clear in terms of class-names.

As a former cocos2d developer, I recommend ansca to take a look at how cocos2d has done some of the stuff.
It's really clear in terms of what happens, and clear in terms of class-names.

views:1504 update:2011/10/26 9:29:31
corona forums © 2003-2011