• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Newbie Q: Is it possible to draw functional "Cocoa Controls" in an OpenGL context?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie Q: Is it possible to draw functional "Cocoa Controls" in an OpenGL context?


  • Subject: Re: Newbie Q: Is it possible to draw functional "Cocoa Controls" in an OpenGL context?
  • From: Alastair Houghton <email@hidden>
  • Date: Wed, 14 Feb 2007 23:51:37 +0000

On 14 Feb 2007, at 23:21, Daniel Steward wrote:

OK - now I'm curious. Not having used NSOpenGLView myself I'm just throwing things out. How would it work to build a composite subclass of NSView which includes an NSOpenGLView as a subview along with buttons above it.

Like Scott said, you can't do that at the moment; you aren't supposed to overlap views (and you'd very likely have trouble anyway with an NSOpenGLView because it's a hardware accelerated surface), and you can't have subviews of NSOpenGLView.


Creating a separate window seems like a hard way to do this because it seems like you would have to write some sort of glue (literally) code to tie the two together spatially.

I don't think you need any code for that :-)

Take a look at NSWindow's -addChildWindow:ordered:.

I suppose the other question is why can't other things draw on top of the OpenGL view? Is there something about the glContext that makes this a problem?

Yes, it's hardware accelerated. The memory backing it may be organised differently than normal, and it will be updated by the 3D engine on the video card as and when necessary.


Kind regards,

Alastair

--
http://alastairs-place.net

_______________________________________________

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


References: 
 >Newbie Q: Is it possible to draw functional "Cocoa Controls" in an OpenGL context? (From: Matt Trinneer <email@hidden>)
 >Re: Newbie Q: Is it possible to draw functional "Cocoa Controls" in an OpenGL context? (From: Daniel Steward <email@hidden>)
 >Re: Newbie Q: Is it possible to draw functional "Cocoa Controls" in an OpenGL context? (From: Scott Anguish <email@hidden>)
 >Re: Newbie Q: Is it possible to draw functional "Cocoa Controls" in an OpenGL context? (From: Daniel Steward <email@hidden>)

  • Prev by Date: Frustration trying to get NSConnection/NSPort working (feels like it should be simpler ...)
  • Next by Date: PDFMarkupAnnotations not showing when drawing PDFPage
  • Previous by thread: Re: Newbie Q: Is it possible to draw functional "Cocoa Controls" in an OpenGL context?
  • Next by thread: Re: Newbie Q: Is it possible to draw functional "Cocoa Controls" in an OpenGL context?
  • Index(es):
    • Date
    • Thread