3

Our cocos2dx game heavily uses batchnodes but in some devices like samsung quattro and grand after few sessions of gameplay some SpriteSheets go black. And eventually all the sprite sheets go black. We are using CCTextureAtlas to load our batch nodes.

Following are the logs which we think might be creating problem

04-10 08:43:54.171: D/cocos2d-x debug info(3592): OpenGL error 0x0505 in /Users/jitenagarwal/cocos2d-x-2.2.6/projects/pabAndroid/proj.android/../../../cocos2dx/sprite_nodes/CCSprite.cpp draw 663 * 04-10 08:48:38.541: D/cocos2d-x debug info(3592): OpenGL error 0x0505 in /Users/jitenagarwal/cocos2d-x-2.2.6/projects/pabAndroid/proj.android/../../../cocos2dx/textures/CCTextureAtlas.cpp mapBuffers 306

We have tried following things but nothing helps

  1. We decreased the size of pngs.

  2. We changed the kDefaultSpriteBatchCapacity 128 in CCSpriteBatchnode.h

  3. https://developer.qualcomm.com/forum/qdevnet-forums/mobile-gaming-graphics-optimization-adreno/26579

  4. http://discuss.cocos2d-x.org/t/black-pictures-after-a-playing-time/7069/119?page=6

  5. http://www.cocos2d-x.org/wiki/Max

The problems happens only on Some devices such as Samsung grand quattro.

Device log when this happens 04-10 08:53:19.651: W/Adreno200-GSL(6804): : ioctl code 0xc00c092f (IOCTL_KGSL_GPMEM_ALLOC) failed: errno 12 Out of memory

user1847220
  • 119
  • 3

1 Answers1

0

You guys don't need to decrease size of png's. Try this, it may help you out..

  1. Load only sprite-sheets that are currently required.
  2. Unload all unused textures and sprite-sheets that are no longer in use.
  3. make sure that sprite-sheet texture file are not corrupted.