在使用1.4.2引擎过程中编写的截图工具,再将项目在1.8.1中进行打包过程中截图时报错
报错代码:var renderTexture = new cc.RenderTexture(width, height, undefined, gl.STENCIL_INDEX8);
报错断点:gl.texImage2D(gl.TEXTURE_2D, 0, glFmt.internalFormat, glFmt.format, glFmt.pixelType, img)
报错内容:Uncaught TypeError: Failed to execute ‘texImage2D’ on ‘WebGLRenderingContext’: No function was found that matched the signature provided.
at CCClass.190.game.once._p._setImage (cocos2d-js.js:35579)
at CCClass.190.game.once._p.update (cocos2d-js.js:35562)
at CCClass.190.game.once._p.initWithData (cocos2d-js.js:35600)
at 243.cc.RenderTexture.WebGLRenderCmd.243.proto.initWithWidthAndHeight (cocos2d-js.js:43839)
at TheClass.initWithWidthAndHeight (cocos2d-js.js:43598)
at TheClass.ctor (cocos2d-js.js:43565)
at new TheClass (cocos2d-js.js:30313)
at eval (eval at saveNodeToTempFilePathSync (project.dev.js:58178), :1:1)
at Object.saveNodeToTempFilePathSync (project.dev.js:58178)
at Object.shareNodeImg (project.dev.js:58164)
在和之前的版本检查后未找到原因