From 860057c30731a53d276a4c4819b31228080d6664 Mon Sep 17 00:00:00 2001 From: vision Date: Thu, 5 Jun 2014 10:58:27 +0800 Subject: [PATCH] Use the image format instead of RGBA8888 when initializing a texture, this would remove the redudant conversion and save memories. --- cocos/renderer/CCTexture2D.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cocos/renderer/CCTexture2D.cpp b/cocos/renderer/CCTexture2D.cpp index d2b634233d..dfc548899b 100644 --- a/cocos/renderer/CCTexture2D.cpp +++ b/cocos/renderer/CCTexture2D.cpp @@ -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)