mirror of https://github.com/axmolengine/axmol.git
Use the image format instead of RGBA8888 when initializing a texture, this would remove the redudant conversion and save memories.
This commit is contained in:
parent
c90f2b3251
commit
860057c307
|
@ -704,7 +704,7 @@ std::string Texture2D::getDescription() const
|
|||
// implementation Texture2D (Image)
|
||||
bool Texture2D::initWithImage(Image *image)
|
||||
{
|
||||
return initWithImage(image, PixelFormat::NONE);
|
||||
return initWithImage(image, image->getRenderFormat());
|
||||
}
|
||||
|
||||
bool Texture2D::initWithImage(Image *image, PixelFormat format)
|
||||
|
|
Loading…
Reference in New Issue