Pārlūkot izejas kodu

Restore applyStates() before clear()

Scott Ramsby 7 gadi atpakaļ
vecāks
revīzija
1fe81ae30d
1 mainītis faili ar 2 papildinājumiem un 0 dzēšanām
  1. 2 0
      src/Engine/babylon.engine.ts

+ 2 - 0
src/Engine/babylon.engine.ts

@@ -1902,6 +1902,8 @@
          * @param stencil defines if the stencil buffer must be cleared
          */
         public clear(color: Nullable<Color4>, backBuffer: boolean, depth: boolean, stencil: boolean = false): void {
+            this.applyStates();
+
             var mode = 0;
             if (backBuffer && color) {
                 this._gl.clearColor(color.r, color.g, color.b, color.a !== undefined ? color.a : 1.0);