Re: Cocoa controls on top of an OpenGL view
Re: Cocoa controls on top of an OpenGL view
- Subject: Re: Cocoa controls on top of an OpenGL view
- From: John Stiles <email@hidden>
- Date: Sun, 03 Jun 2007 11:36:04 -0700
Ricky Sharp wrote:
On Jun 3, 2007, at 1:12 PM, John Stiles wrote:
Is there a recommended way to float Cocoa controls on top of an
NSOpenGLView?
In Carbon, we were able to do this by creating one window which
contained an AGL surface, and then a separate Carbon window. We
"combined" the two windows with window groups and the visual effect
worked.
I believe window groups can be simulated/implemented via child
windows. See addChildWindow:ordered:
Cool, I'll check that out.
I'd be OK with this but I don't know if there is a Cocoa equivalent
to window groups, and if there is a simpler way, I'd like to know
more. I do know that, in general, Cocoa does not support Z-ordering
for controls, so that seems like a potential stumbling block.
When you speak of z-ordered, it's true that if you have a set of
sibling controls (views), z-order amongst them is undefined (as well
as the fact you cannot overlap them without side-effects).
To achieve a well-defined order, you would need to use subviews.
Do you have the need for overlapping controls?
Well, I need arbitrary Cocoa controls to overlay an OpenGL graphic. So
you could consider that like an NSOpenGLView with other NSViews on top
of it. But I was under the impression that this wouldn't fly, so I've
been dreaming up alternatives.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden