mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 08:02:39 +08:00
Merge pull request #217 from minggo/rendertexture-setopacity-notwork
fix the issue that set opacity can not modify RGB
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user