|
@@ -845,6 +845,21 @@ function WebGLState( gl, extensions, utils, capabilities ) {
|
|
|
|
|
|
}
|
|
|
|
|
|
+ function unbindTexture() {
|
|
|
+
|
|
|
+ var boundTexture = currentBoundTextures[ currentTextureSlot ];
|
|
|
+
|
|
|
+ if ( boundTexture !== undefined && boundTexture.type !== undefined ) {
|
|
|
+
|
|
|
+ gl.bindTexture( boundTexture.type, null );
|
|
|
+
|
|
|
+ boundTexture.type = undefined;
|
|
|
+ boundTexture.texture = undefined;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
function compressedTexImage2D() {
|
|
|
|
|
|
try {
|
|
@@ -977,6 +992,7 @@ function WebGLState( gl, extensions, utils, capabilities ) {
|
|
|
|
|
|
activeTexture: activeTexture,
|
|
|
bindTexture: bindTexture,
|
|
|
+ unbindTexture: unbindTexture,
|
|
|
compressedTexImage2D: compressedTexImage2D,
|
|
|
texImage2D: texImage2D,
|
|
|
texImage3D: texImage3D,
|