@@ -2601,7 +2601,6 @@ var WebGLRenderer = new Class({
26012601
26022602 if ( width > 0 && height > 0 )
26032603 {
2604- // this.setTexture2D(dstTexture, 0);
26052604 gl . activeTexture ( gl . TEXTURE0 ) ;
26062605 var currentTexture = gl . getParameter ( gl . TEXTURE_BINDING_2D ) ;
26072606 gl . bindTexture ( gl . TEXTURE_2D , dstTexture ) ;
@@ -2613,7 +2612,6 @@ var WebGLRenderer = new Class({
26132612 dstTexture . width = width ;
26142613 dstTexture . height = height ;
26152614
2616- // this.setTexture2D(null, 0);
26172615 if ( currentTexture )
26182616 {
26192617 gl . bindTexture ( gl . TEXTURE_2D , currentTexture ) ;
@@ -2688,7 +2686,9 @@ var WebGLRenderer = new Class({
26882686
26892687 if ( width > 0 && height > 0 )
26902688 {
2691- this . setTexture2D ( dstTexture , 0 ) ;
2689+ gl . activeTexture ( gl . TEXTURE0 ) ;
2690+ var currentTexture = gl . getParameter ( gl . TEXTURE_BINDING_2D ) ;
2691+ gl . bindTexture ( gl . TEXTURE_2D , dstTexture ) ;
26922692
26932693 gl . pixelStorei ( gl . UNPACK_FLIP_Y_WEBGL , flipY ) ;
26942694
@@ -2697,7 +2697,10 @@ var WebGLRenderer = new Class({
26972697 dstTexture . width = width ;
26982698 dstTexture . height = height ;
26992699
2700- this . setTexture2D ( null , 0 ) ;
2700+ if ( currentTexture )
2701+ {
2702+ gl . bindTexture ( gl . TEXTURE_2D , currentTexture ) ;
2703+ }
27012704 }
27022705
27032706 return dstTexture ;
0 commit comments