Merge pull request #217 from minggo/rendertexture-setopacity-notwork

fix the issue that set opacity can not modify RGB
This commit is contained in:
minggo
2016-07-18 18:01:26 +08:00
committed by GitHub
+1
View File
@@ -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);