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

WebGLState: currentTextureSlot to null.

Mr.doob 9 жил өмнө
parent
commit
427dc339f9

+ 3 - 3
src/renderers/webgl/WebGLState.js

@@ -51,7 +51,7 @@ THREE.WebGLState = function ( gl, extensions, paramThreeToGL ) {
 
 
 	var maxTextures = gl.getParameter( gl.MAX_TEXTURE_IMAGE_UNITS );
 	var maxTextures = gl.getParameter( gl.MAX_TEXTURE_IMAGE_UNITS );
 
 
-	var currentTextureSlot = undefined;
+	var currentTextureSlot = null;
 	var currentBoundTextures = {};
 	var currentBoundTextures = {};
 
 
 	var currentClearColor = new THREE.Vector4();
 	var currentClearColor = new THREE.Vector4();
@@ -605,7 +605,7 @@ THREE.WebGLState = function ( gl, extensions, paramThreeToGL ) {
 
 
 	this.bindTexture = function ( webglType, webglTexture ) {
 	this.bindTexture = function ( webglType, webglTexture ) {
 
 
-		if ( currentTextureSlot === undefined ) {
+		if ( currentTextureSlot === null ) {
 
 
 			_this.activeTexture();
 			_this.activeTexture();
 
 
@@ -739,7 +739,7 @@ THREE.WebGLState = function ( gl, extensions, paramThreeToGL ) {
 
 
 		compressedTextureFormats = null;
 		compressedTextureFormats = null;
 
 
-		currentTextureSlot = undefined;
+		currentTextureSlot = null;
 		currentBoundTextures = {};
 		currentBoundTextures = {};
 
 
 		currentBlending = null;
 		currentBlending = null;