Procházet zdrojové kódy

Set rendering state properly during Group2D.render

nockawa před 9 roky
rodič
revize
5ba4d81f8b

+ 0 - 1
src/Canvas2d/babylon.canvas2d.ts

@@ -922,7 +922,6 @@
                 this._updateOverStatus();   // TODO this._primPointerInfo may not be up to date!
             }
 
-            this.engine.setState(false);
             this._groupRender();
 
             // If the canvas is cached at canvas level, we must manually render the sprite that will display its content

+ 2 - 1
src/Canvas2d/babylon.group2d.ts

@@ -350,7 +350,8 @@
                 // ===================================================================
                 // First pass, update the InstancedArray and render Opaque primitives
 
-                // Disable Alpha Testing, Enable Depth Write
+                // Disable Culling, Alpha Testing, Enable Depth Write
+                engine.setState(false);
                 engine.setAlphaTesting(false);
                 engine.setDepthWrite(true);