Littorio
21-08-2010 14:09:28
In my game i have to display 4 different images over each enemy.
I Use a Canvas where i create the StaticImages and display them.
If i create the images in this order
for (...) {create_image1();create_image2();create_image3();create_image4();}
the batch count go really high
if instead i create them in this order
for (...) create_image1();
for (...) create_image2();
for (...) create_image3();
for (...) create_image4();
the batch count barely increase
I have tried to sort the mWidgetChild vector of the canvas afterward but it has no effect.
There is something to do to allow the creation in of static images in random order without performance loss?
I Use a Canvas where i create the StaticImages and display them.
If i create the images in this order
for (...) {create_image1();create_image2();create_image3();create_image4();}
the batch count go really high
if instead i create them in this order
for (...) create_image1();
for (...) create_image2();
for (...) create_image3();
for (...) create_image4();
the batch count barely increase
I have tried to sort the mWidgetChild vector of the canvas afterward but it has no effect.
There is something to do to allow the creation in of static images in random order without performance loss?