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: Shamyl Zakariya <email@hidden>
- Date: Mon, 4 Jun 2007 11:45:45 -0400
I've done the child-window thing before and it worked really well.
One thing that should be considered however is that -- and I could be
wrong -- I believe automatic v-sync of OpenGL views
( NSOpenGLCPSwapInterval ) is disabled when a window is partially
occluded by another. Since the child window, by definition, is
overlaying your GL view, you might get some tearing in your display
( provided you're not using some other mechanism to manually vsync ).
That being said, I could be wrong. The reason I bring it up is that
I've noticed automatic sync throttling is lost in my apps when one is
partially or fully occluded by some other window.
email@hidden
"go forth and be excellent to eachother"
-- Bill and Ted
On Jun 4, 2007, at 3:09 AM, Scott Anguish wrote:
On Jun 3, 2007, at 2: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'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.
others have already mentioned the floating window thing...
there is sample code for this technique. FunkyOverlayWindow
http://developer.apple.com/samplecode/FunkyOverlayWindow/index.html
_______________________________________________
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
_______________________________________________
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