소스 검색

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

Nicolas Cannasse 3 년 전
부모
커밋
dc12060ecc
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  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);