Do multiple imageSheets share a single texture in memory?

Hi,

when I use newImageSheet to create multiple image sheets but they all use the same filename (i.e. reference the same image), will Corona load the image multiple times or will it only load the image once?

local sheetTheme1 = display.newImageSheet( “sprites.png”, sheet_theme_1_options )

local sheetTheme2 = display.newImageSheet( “sprites.png”, sheet_theme_2_options )

The reason I need this is, I want to have several groups of frames I can reference with the same indices but I prefer my asset as compact as possible, i.e. they all fit easily onto a single image.

I don’t want to use Sprites/Animations and then set the frames manually because then I’d rather just use my own mapping table which would be more lightweight.

Best regards,

Michael

Corona will load the texture once and draw it many times.  The second reference to the same graphic only references the first loaded image memory location.

Great to know, thanks.

Corona will load the texture once and draw it many times.  The second reference to the same graphic only references the first loaded image memory location.

Great to know, thanks.