7foots
7foots

Reputation: 31

SKView CAMetalLayer framebufferOnly = false flips content by y. Why?

This code cause SKView flip content by Y:

let sceneView = SKView(frame: CGRect(x:0 , y:0, width: 640, height: 480))
...
(sceneView.layer as? CAMetalLayer)?.framebufferOnly = false

View playground with this bug on GitHub.com

I finded solve, but don't know how good is

sceneView.transform = CGAffineTransform.identity.scaledBy(x: 1.0, y: -1.0)

But still don't understand why this flip happens, and if there exist better solved of this?

Upvotes: 0

Views: 70

Answers (1)

7foots
7foots

Reputation: 31

I finded solve, but don't know how good is

sceneView.transform = CGAffineTransform.identity.scaledBy(x: 1.0, y: -1.0)

But still don't understand why this flip happens, and if there exist better solved of this?

Upvotes: 0

Related Questions