Explorar o código

unbind webgl2 textures too

Alexander Rose %!s(int64=6) %!d(string=hai) anos
pai
achega
633fbe46c9
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      src/mol-gl/webgl/context.ts

+ 4 - 0
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