2
0
Эх сурвалжийг харах

WebGLTextures: Unbind textures with dedicated method. (#22394)

Michael Herzog 3 жил өмнө
parent
commit
57b7a9b5aa

+ 4 - 4
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();
 
 			}