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:
vision 2014-06-05 10:58:27 +08:00
parent c90f2b3251
commit 860057c307
1 changed files with 1 additions and 1 deletions

View File

@ -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)