cocos2d-x icon indicating copy to clipboard operation
cocos2d-x copied to clipboard

fix the bug that ect1 texture lost on android

Open Canon0223 opened this issue 2 years ago • 0 comments

  • cocos2d-x version:3.9
  • devices test on:android
  • developing environments
    • NDK version:
    • Xcode version:
    • VS version:
    • browser type and version:

Steps to Reproduce:

#17278 not fix the bug // etc1 support check whether alpha texture exists & load it auto alphaFile = vt->_fileName + TextureCache::getETC1AlphaFileSuffix(); Texture2D::PixelFormat oldPixelFormat = Texture2D::getDefaultAlphaPixelFormat();
reloadTexture(vt->_texture->getAlphaTexture(), alphaFile, vt->_pixelFormat);

//After reload alphaTexture, you should setAlphaTexture,Like: vt->_texture->setAlphaTexture(vt->_texture->getAlphaTexture());

//otherwise,ect1 texture will lost still

Canon0223 avatar Dec 16 '22 09:12 Canon0223