The intelligence boosting power of posting a question strikes again.

The problem was that in the Mac OS X Storyboard, the "Rendering API" of the
SCNView was initialized to "unknown" when it needed to be "Metal"
(curiously, "OpenGL" and "Default" don't render the overlay either).  This
is the "renderingAPI" required property of the SCNRenderer protocol that
SCNView obeys; it's most easily set in IB.


On Fri, Feb 26, 2016 at 5:19 PM, Gavin Eadie <ga...@umich.edu> wrote:

> I have struggled long and hard with this .. I think I’ve looked at
> 'everything' related on Google, but I’m still flummoxed.
>
> This is on Mac OS 10.11.3, build with Xcode 7.2, and this is what I think
> is the salient code.
>
>     override func viewDidLoad() {
>         super.viewDidLoad()
>
>         let scene = SCNScene()
>         let sceneView = self.view as! SCNView
>
>         sceneView.scene = scene
>         sceneView.overlaySKScene = OverlayScene(size: sceneView.bounds.
> size)
>         sceneView.backgroundColor = NSColor.blackColor()
>         sceneView.autoenablesDefaultLighting = true
>         sceneView.showsStatistics = true
>     }
>
> ('OverlayScene' generates a simple SKScene with some centered text)
>
> On the Mac it works correctly if the window layout is described by a XIB.
> On the Mac it doesn’t show the overlay if the window layout is described
> by a Storyboard.
>
> The XIB and Storyboard are quite different (as is normal), but what in
> there could have this effect?
>
> Any help to resolve this would be appreciated .. I suspect, as is often
> the case, I’m overlooking something obvious .. Thanks
>
> FWIW: This same code works correctly on iOS using a Storyboard.
>
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to