On Oct 31, 2013, at 4:02 AM, Eric Wing <ewmail...@gmail.com> wrote:

> On 10/30/13, Charles Srstka <cocoa...@charlessoft.com> wrote:
>> In Apple's Sprite Kit documentation, it claims:
>> 
>> "Because Sprite Kit content is rendered by a view object, you can combine
>> this view with other views in the view hierarchy. For example, you can use
>> standard button controls and place them above your Sprite Kit view. Or, you
>> can add interactivity to sprites to implement your own buttons; the choice
>> is up to you."
>> 
>> https://developer.apple.com/library/mac/documentation/GraphicsAnimation/Conceptual/SpriteKit_PG/GettingStarted/GettingStarted.html
>> 
>> However, I have so far had no success getting NSButtons and other
>> NSView-based views to appear on top of an SKView. I've tried making the view
>> a subview of the SKView, making it an overlapping sibling view, building it
>> programmatically, putting it in the XIB — in all cases, the NSView-based
>> object is not drawn.
>> 
>> Am I missing something here? Is there some flag somewhere that I need to set
>> for this to work? Or is the documentation here incorrect?
>> 
>> Thanks,
>> Charles
>> 
> 
> I haven't tried it myself, but stupid question, did you remember to
> enable layer backed views?
> 
> I've spent many years trying to get native controls to render on top
> of (non-SpriteKit) OpenGL and there's always something that goes
> wrong. In the past couple of years I shifted over to CAOpenGLLayer
> instead of NSOpenGLView. That also had a list of problems, but in the
> end (and after multiple Apple bug fixes), it was working much better
> for me. But I guess I should assume Apple didn't provide a SKLayer
> class.

That's it! I didn't have layers turned on. Brilliant. Now it's showing up 
perfectly. Thanks!

Charles

_______________________________________________

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