Forum > C++ > I use CCSpriteFrameCache to load anim file.And use CCAnimate::actionWithAnimation to play. But after a phone call it begins to draw wrong pic

I use CCSpriteFrameCache to load anim file.And use CCAnimate::actionWithAnimation to play. But after a phone call it begins to draw wrong pic

By liuzhidejll Posted 2012-04-09 08:22 Comments 3
liuzhidejll
  • Posts: 19

Is there anything that I need to do when AppDelegate::applicationDidEnterBackground() and AppDelegate::applicationWillEnterForeground() is called ?

I tried to remove the orignal animation and loaded it again but it crashed!

So if anyone has occured with these problem or has any idea ,please tell me.Thanks!

I think I need to do sth. when onPause and onResume; I tried it. Every interrupt will cause the animate draws wrong pic!

liuzhidejll
  • Posts: 19

#1 RE: 2012-04-09 09:26

anyone know it?

liuzhidejll
  • Posts: 19

#2 RE: 2012-04-10 10:54

I sovle it. On android phone ,you should avoid using pvr.ccz file as image. I use normal png pic and it works fine. pvr.ccz may work fine on iphone and other phone using pvr graphic card.So that’s may be the reason why the official testes don’t use pvr.ccz in the demo.

Weeds
  • Posts: 75

#3 RE: 2012-04-13 02:15

PVR texture compression is a proprietary texture compression format, only supported by PowerVR chips (Motorola and some Samsung Phones fore example)
It won’t work on Tegra 2 or Adreno devices (HTC, Sony Ericsson phones, many tablets).

You might still be able to use the compressed files. Just check if the appropriate OpenGL extension is available.
Compressed textures will save you quite some memory (video memory as well as memory bandwith)

See http://developer.android.com/guide/topics/graphics/opengl.html\#textures for a discussion on texture compression on Android.

Loggin to reply

Copyright © 2010 - 2013 Cocos2d-x.orgClustrmaps