abhi66 / rokon

Automatically exported from code.google.com/p/rokon
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

only can render at most 64 sprites in one layer #123

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.new Scene(1, 88);
2.add 10 sprites on the scene first
3.remove sprites and create new sprites when playing games
4.when there are 64 sprites on the scene, no more sprite can render anyway

What is the expected output?
render 88 sprites finally

What do you see instead?
only 64 sprites on the screen

What version of Rokon are you using?
2.0.3

On which version of Android are you experiencing this?
emulator1.5,1.6,2.1,2.2

Please provide any additional information below.
I track to the function RenderQueueManager.swap(RokonRenderer renderer),
add Debug.print("count="+renderQueue[queueIndex].getCount()), 
renderQueue[queueIndex] is an ObjectManager I know, the count will increase 
when I add new sprites, but until count = 64, it will no longer increase! 

Original issue reported on code.google.com by rayjun...@gmail.com on 23 Jul 2010 at 3:26

GoogleCodeExporter commented 9 years ago
I really see that in the RenderQueueManager constructor:
for(int i = 0; i < RENDER_QUEUE_COUNT; i++) {
    renderQueue[i] = new ObjectManager(256);
}
256 means that can render 256 objects?Right?But it doesn't work properly.

In the ObjectManager class, there is a constant DEFAULT_ARRAY_SIZE = 64, I 
modify it to 128, then it works! I can render more than 64 sprites! But why?

Original comment by rayjun...@gmail.com on 23 Jul 2010 at 3:43

GoogleCodeExporter commented 9 years ago
Should be sorted in next trunk update.

Thanks

Original comment by rtaylor205@gmail.com on 25 Jul 2010 at 9:39

GoogleCodeExporter commented 9 years ago
Fixed? I updated from svn at revision 360, indeed I saw change of 
ObjectManager.java, but the bug is still there with my game

Original comment by rayjun...@gmail.com on 27 Jul 2010 at 4:04