hmmm, what I said still stands.
Let’s say I have an atlas in a single .png file and I load said file in a
Now, I create a
Sprite called “bob” and do a
bob.graphics.beginBitmapFill and then a
Ok, that is boring, I need another thing on screen. Let’s say I create another
Sprite called sally and do the same thing,
sally.graphics.drawRect with the exact same
BitmapData that I used for bob.
sally and bob will not be batch rendered. They are in 2 different
DisplayObject and each
DisplayObject will take one draw call minimum.
The way to get performance would be to create a
Sprite called “friends” and do something like
friends.graphics.beginBitmapFill(<Matrix data for bob here>);
friends.graphics.drawRect(<where you need to draw bob>);
friends.graphics.beginBitmapFill(<Matrix data for sally here>);
friends.graphics.drawRect(<where you need to draw sally>);
This is easily achieved if you use