From 57b7a9b5aa4ca4339419bc10bd531fcf1f0cc546 Mon Sep 17 00:00:00 2001 From: Michael Herzog Date: Mon, 23 Aug 2021 14:01:01 +0200 Subject: [PATCH] WebGLTextures: Unbind textures with dedicated method. (#22394) --- src/renderers/webgl/WebGLTextures.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/renderers/webgl/WebGLTextures.js b/src/renderers/webgl/WebGLTextures.js index 4c2da6447ba739..db3f5d0298cd77 100644 --- a/src/renderers/webgl/WebGLTextures.js +++ b/src/renderers/webgl/WebGLTextures.js @@ -1178,7 +1178,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils, } - state.bindTexture( _gl.TEXTURE_CUBE_MAP, null ); + state.unbindTexture(); } else if ( isMultipleRenderTargets ) { @@ -1201,7 +1201,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils, } - state.bindTexture( _gl.TEXTURE_2D, null ); + state.unbindTexture(); } else { @@ -1234,7 +1234,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils, } - state.bindTexture( glTextureType, null ); + state.unbindTexture(); } @@ -1265,7 +1265,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils, state.bindTexture( target, webglTexture ); generateMipmap( target, texture, renderTarget.width, renderTarget.height ); - state.bindTexture( target, null ); + state.unbindTexture(); }