From 633fbe46c97a124ffafb8fe0f05b52549441288a Mon Sep 17 00:00:00 2001
From: Alexander Rose <alex.rose@rcsb.org>
Date: Fri, 5 Apr 2019 14:30:36 -0700
Subject: [PATCH] unbind webgl2 textures too

---
 src/mol-gl/webgl/context.ts | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/mol-gl/webgl/context.ts b/src/mol-gl/webgl/context.ts
index 5d996889b..91e391d20 100644
--- a/src/mol-gl/webgl/context.ts
+++ b/src/mol-gl/webgl/context.ts
@@ -51,6 +51,10 @@ function unbindResources (gl: GLRenderingContext) {
         gl.activeTexture(gl.TEXTURE0 + i)
         gl.bindTexture(gl.TEXTURE_2D, null)
         gl.bindTexture(gl.TEXTURE_CUBE_MAP, null)
+        if (isWebGL2(gl)) {
+            gl.bindTexture(gl.TEXTURE_2D_ARRAY, null)
+            gl.bindTexture(gl.TEXTURE_3D, null)
+        }
     }
 
     // assign the smallest possible buffer to all attributes
-- 
GitLab