提交 bdbc68bc 编写于 作者: T Takahiro

Revert the change of setupFrameBufferTexture in WebGLTextures

上级 dc11dedc
......@@ -654,8 +654,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
var glFormat = utils.convert( renderTarget.texture.format );
var glType = utils.convert( renderTarget.texture.type );
var glInternalFormat = getInternalFormat( glFormat, glType );
var array = ( _gl.isWebGL2 ) ? new Uint8Array( renderTarget.width * renderTarget.height * 4 ) : null;
state.texImage2D( textureTarget, 0, glInternalFormat, renderTarget.width, renderTarget.height, 0, glFormat, glType, array );
state.texImage2D( textureTarget, 0, glInternalFormat, renderTarget.width, renderTarget.height, 0, glFormat, glType, null );
_gl.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer );
_gl.framebufferTexture2D( _gl.FRAMEBUFFER, attachment, textureTarget, properties.get( renderTarget.texture ).__webglTexture, 0 );
_gl.bindFramebuffer( _gl.FRAMEBUFFER, null );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册