Jelajahi Sumber

fix ctx.begin was never called (close #1011)

Nicolas Cannasse 3 tahun lalu
induk
melakukan
dc12060ecc
1 mengubah file dengan 2 tambahan dan 1 penghapusan
  1. 2 1
      h2d/Scene.hx

+ 2 - 1
h2d/Scene.hx

@@ -741,7 +741,8 @@ class Scene extends Layers implements h3d.IDrawable implements hxd.SceneEvents.I
 		if( !inRender ) { // don't reset current tex stack
 			ctx.engine.begin();
 			ctx.begin();
-		}
+		} else if( @:privateAccess ctx.targetFlipY == 0 )
+			ctx.begin(); // ctx was never init, most likely a new scene
 		ctx.pushTargets(texs);
 		if( outputs != null ) @:privateAccess ctx.manager.setOutput(outputs);
 		s.drawRec(ctx);