浏览代码

Fix WipeCache VAO

sebavan 5 年之前
父节点
当前提交
5ea50744c2
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      src/Engines/thinEngine.ts

+ 3 - 1
src/Engines/thinEngine.ts

@@ -2623,6 +2623,9 @@ export class ThinEngine {
         this._viewportCached.z = 0;
         this._viewportCached.w = 0;
 
+        // Done before in case we clean the attributes
+        this._unbindVertexArrayObject();
+
         if (bruteForce) {
             this._currentProgram = null;
             this.resetTextureCache();
@@ -2651,7 +2654,6 @@ export class ThinEngine {
         this._resetVertexBufferBinding();
         this._cachedIndexBuffer = null;
         this._cachedEffectForVertexBuffers = null;
-        this._unbindVertexArrayObject();
         this.bindIndexBuffer(null);
     }