|
@@ -5596,16 +5596,24 @@ THREE.WebGLRenderer = function ( parameters ) {
|
|
|
|
|
|
_gl.activeTexture( _gl.TEXTURE0 + slot );
|
|
|
|
|
|
- if ( texture.needsUpdate ) {
|
|
|
+ if ( texture.needsUpdate === true ) {
|
|
|
|
|
|
- _this.uploadTexture( texture );
|
|
|
+ var image = texture.image;
|
|
|
|
|
|
- } else {
|
|
|
+ if ( image.complete === false ) {
|
|
|
+
|
|
|
+ THREE.warn( 'THREE.WebGLRenderer: Texture marked for update but image is incomplete', texture );
|
|
|
+ return;
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
- _gl.bindTexture( _gl.TEXTURE_2D, texture.__webglTexture );
|
|
|
+ _this.uploadTexture( texture );
|
|
|
+ return;
|
|
|
|
|
|
}
|
|
|
|
|
|
+ _gl.bindTexture( _gl.TEXTURE_2D, texture.__webglTexture );
|
|
|
+
|
|
|
};
|
|
|
|
|
|
function clampToMaxSize ( image, maxSize ) {
|