From 64f5463c3c5dfef88722b4b2300ffe3428d850e6 Mon Sep 17 00:00:00 2001 From: minggo Date: Mon, 18 Jul 2016 16:02:06 +0800 Subject: [PATCH] fix the issue that set opacity can not modify RGB --- native/cocos/2d/CCRenderTexture.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/native/cocos/2d/CCRenderTexture.cpp b/native/cocos/2d/CCRenderTexture.cpp index e84d3fc0ac..8ae8e1c935 100644 --- a/native/cocos/2d/CCRenderTexture.cpp +++ b/native/cocos/2d/CCRenderTexture.cpp @@ -319,6 +319,7 @@ bool RenderTexture::initWithWidthAndHeight(int w, int h, Texture2D::PixelFormat _sprite->setFlippedY(true); _sprite->setBlendFunc( BlendFunc::ALPHA_PREMULTIPLIED ); + _sprite->setOpacityModifyRGB(true); glBindRenderbuffer(GL_RENDERBUFFER, oldRBO); glBindFramebuffer(GL_FRAMEBUFFER, _oldFBO);