SpriteKit: why does SKView disappear at one height but appears at another height? What's the maximum height for SKView?

后端 未结 1 1738
栀梦
栀梦 2021-01-27 08:16

The code below shows a SKView until you change skHeight to 2050 or some higher value like 5000.

1) How can you make the SKView app

相关标签:
1条回答
  • 2021-01-27 08:44

    OpenGL rendering does not support canvas sizes greater than 4096x4096 on many devices, your view is 2050x2050, so when you factor in retina mode, it really becomes 4100x4100.

    Now the @3x devices are even crazier, because it needs to handle the hardware scaling and shrinking, so you only end up getting views of about 1501x1501.

    Metal does not have this problem, and as of iOS 12, OpenGL is deprecated, so hopefully the Simulators will be using Metal as well. (It should since Mojave only supports metal devices)

    0 讨论(0)
提交回复
热议问题