Skip to content

Commit f20b14a

Browse files
Mee-guminggo
authored andcommitted
no need to convert to RGBA8888 when it is DEFAULT (#20397)
1 parent b53528c commit f20b14a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cocos/renderer/CCTextureCube.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ bool TextureCube::init(const std::string& positive_x, const std::string& negativ
228228
uint8_t *useData = pData;
229229

230230
//convert pixel format to RGBA
231-
if (ePixelFmt != backend::PixelFormat::RGBA8888)
231+
if (ePixelFmt != backend::PixelFormat::RGBA8888 && ePixelFmt != backend::PixelFormat::DEFAULT)
232232
{
233233
size_t len = 0;
234234
backend::PixelFormatUtils::convertDataToFormat(pData, img->getDataLen(), ePixelFmt, backend::PixelFormat::RGBA8888, &cData, &len);

0 commit comments

Comments
 (0)