|
@@ -2818,7 +2818,15 @@ function WebGLRenderer( parameters ) {
|
|
|
|
|
|
} else {
|
|
|
|
|
|
- _gl.texSubImage2D( _gl.TEXTURE_2D, level, position.x, position.y, glFormat, glType, srcTexture.image );
|
|
|
+ if ( srcTexture.isCompressedTexture ) {
|
|
|
+
|
|
|
+ _gl.compressedTexSubImage2D( _gl.TEXTURE_2D, level, position.x, position.y, srcTexture.mipmaps[ 0 ].width, srcTexture.mipmaps[ 0 ].height, glFormat, srcTexture.mipmaps[ 0 ].data );
|
|
|
+
|
|
|
+ } else {
|
|
|
+
|
|
|
+ _gl.texSubImage2D( _gl.TEXTURE_2D, level, position.x, position.y, glFormat, glType, srcTexture.image );
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
|