|
@@ -460,8 +460,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
|
|
|
|
|
|
}
|
|
|
|
|
|
- state.activeTexture( _gl.TEXTURE0 + slot );
|
|
|
- state.bindTexture( _gl.TEXTURE_2D, textureProperties.__webglTexture );
|
|
|
+ state.bindTexture( _gl.TEXTURE_2D, textureProperties.__webglTexture, _gl.TEXTURE0 + slot );
|
|
|
|
|
|
}
|
|
|
|
|
@@ -476,8 +475,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
|
|
|
|
|
|
}
|
|
|
|
|
|
- state.activeTexture( _gl.TEXTURE0 + slot );
|
|
|
- state.bindTexture( _gl.TEXTURE_2D_ARRAY, textureProperties.__webglTexture );
|
|
|
+ state.bindTexture( _gl.TEXTURE_2D_ARRAY, textureProperties.__webglTexture, _gl.TEXTURE0 + slot );
|
|
|
|
|
|
}
|
|
|
|
|
@@ -492,8 +490,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
|
|
|
|
|
|
}
|
|
|
|
|
|
- state.activeTexture( _gl.TEXTURE0 + slot );
|
|
|
- state.bindTexture( _gl.TEXTURE_3D, textureProperties.__webglTexture );
|
|
|
+ state.bindTexture( _gl.TEXTURE_3D, textureProperties.__webglTexture, _gl.TEXTURE0 + slot );
|
|
|
|
|
|
}
|
|
|
|
|
@@ -508,8 +505,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
|
|
|
|
|
|
}
|
|
|
|
|
|
- state.activeTexture( _gl.TEXTURE0 + slot );
|
|
|
- state.bindTexture( _gl.TEXTURE_CUBE_MAP, textureProperties.__webglTexture );
|
|
|
+ state.bindTexture( _gl.TEXTURE_CUBE_MAP, textureProperties.__webglTexture, _gl.TEXTURE0 + slot );
|
|
|
|
|
|
}
|
|
|
|
|
@@ -681,13 +677,14 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
|
|
|
const forceUpload = initTexture( textureProperties, texture );
|
|
|
const source = texture.source;
|
|
|
|
|
|
- state.activeTexture( _gl.TEXTURE0 + slot );
|
|
|
- state.bindTexture( textureType, textureProperties.__webglTexture );
|
|
|
+ state.bindTexture( textureType, textureProperties.__webglTexture, _gl.TEXTURE0 + slot );
|
|
|
|
|
|
const sourceProperties = properties.get( source );
|
|
|
|
|
|
if ( source.version !== sourceProperties.__version || forceUpload === true ) {
|
|
|
|
|
|
+ state.activeTexture( _gl.TEXTURE0 + slot );
|
|
|
+
|
|
|
_gl.pixelStorei( _gl.UNPACK_FLIP_Y_WEBGL, texture.flipY );
|
|
|
_gl.pixelStorei( _gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, texture.premultiplyAlpha );
|
|
|
_gl.pixelStorei( _gl.UNPACK_ALIGNMENT, texture.unpackAlignment );
|
|
@@ -1042,13 +1039,14 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
|
|
|
const forceUpload = initTexture( textureProperties, texture );
|
|
|
const source = texture.source;
|
|
|
|
|
|
- state.activeTexture( _gl.TEXTURE0 + slot );
|
|
|
- state.bindTexture( _gl.TEXTURE_CUBE_MAP, textureProperties.__webglTexture );
|
|
|
+ state.bindTexture( _gl.TEXTURE_CUBE_MAP, textureProperties.__webglTexture, _gl.TEXTURE0 + slot );
|
|
|
|
|
|
const sourceProperties = properties.get( source );
|
|
|
|
|
|
if ( source.version !== sourceProperties.__version || forceUpload === true ) {
|
|
|
|
|
|
+ state.activeTexture( _gl.TEXTURE0 + slot );
|
|
|
+
|
|
|
_gl.pixelStorei( _gl.UNPACK_FLIP_Y_WEBGL, texture.flipY );
|
|
|
_gl.pixelStorei( _gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, texture.premultiplyAlpha );
|
|
|
_gl.pixelStorei( _gl.UNPACK_ALIGNMENT, texture.unpackAlignment );
|