Sfoglia il codice sorgente

Engine: null check on _bindIndexBufferWithCache to make unindexed draws working again

nockawa 8 anni fa
parent
commit
a56f4a57cd
1 ha cambiato i file con 3 aggiunte e 0 eliminazioni
  1. 3 0
      src/babylon.engine.ts

+ 3 - 0
src/babylon.engine.ts

@@ -1385,6 +1385,9 @@
         }
 
         private _bindIndexBufferWithCache(indexBuffer: WebGLBuffer): void {            
+            if (indexBuffer == null) {
+                return;
+            }
             if (this._cachedIndexBuffer !== indexBuffer) {
                 this._cachedIndexBuffer = indexBuffer;
                 this.bindIndexBuffer(indexBuffer);