mirror of https://github.com/axmolengine/axmol.git
no need to convert to RGBA8888 when it is DEFAULT (#20397)
This commit is contained in:
parent
f584ce4bc5
commit
2ed3343bea
|
@ -228,7 +228,7 @@ bool TextureCube::init(const std::string& positive_x, const std::string& negativ
|
||||||
uint8_t *useData = pData;
|
uint8_t *useData = pData;
|
||||||
|
|
||||||
//convert pixel format to RGBA
|
//convert pixel format to RGBA
|
||||||
if (ePixelFmt != backend::PixelFormat::RGBA8888)
|
if (ePixelFmt != backend::PixelFormat::RGBA8888 && ePixelFmt != backend::PixelFormat::DEFAULT)
|
||||||
{
|
{
|
||||||
size_t len = 0;
|
size_t len = 0;
|
||||||
backend::PixelFormatUtils::convertDataToFormat(pData, img->getDataLen(), ePixelFmt, backend::PixelFormat::RGBA8888, &cData, &len);
|
backend::PixelFormatUtils::convertDataToFormat(pData, img->getDataLen(), ePixelFmt, backend::PixelFormat::RGBA8888, &cData, &len);
|
||||||
|
|
Loading…
Reference in New Issue