Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix the bug that ect1 texture lost on android #20762

Open
Canon0223 opened this issue Dec 16, 2022 · 0 comments
Open

fix the bug that ect1 texture lost on android #20762

Canon0223 opened this issue Dec 16, 2022 · 0 comments

Comments

@Canon0223
Copy link

  • 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant