2.0.10 新版问题 再来个正常的大佬吧💢💢💢

let texture = new cc.RenderTexture(size.width, size.height, cc.Texture2D.PixelFormat.RGBA8888, 0x88f0);
旧版可以 新版不能用这个了 那怎么修改cc.Texture2D.PixelFormat.RGBA8888 ???
新版只能let texture = new cc.RenderTexture(); 截图不支持mask 会mask白屏的

@337031709

@huanxinyin

那截图里若用了Mask组件 会变成白屏 怎么解决呢

_format: 16 默认是16吧 不是0 也就不是RGBA8888???

试试这个方法
let texture = new cc.RenderTexture(size.width, size.height, cc.gfx.RB_FMT_D24S8)

ERROR: Uncaught TypeError: Cannot read property ‘RB_FMT_D24S8’ of undefined

let texture = new cc.RenderTexture();
直接的话 mask组件会白屏

你有点皮。。那还能给解决不。。

2.0.10版本试试这个
let texture = new cc.RenderTexture(size.width, size.height, cc.renderer.renderEngine.gfx.RB_FMT_D24S8)

还是不行。。

然后呢???凉凉???.

可能是其他问题导致的,2.0.10 已经不更新了,你可以更新到2.2版本,看下问题是否解决。

_换成这个 cc.game._renderContext.STENCIL_INDEX8

:sweat:

2.4.7问题依旧。原生平台