• 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: [Leopard] Creating shared NSOpenGLView, Core Animation backed
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Leopard] Creating shared NSOpenGLView, Core Animation backed


  • Subject: Re: [Leopard] Creating shared NSOpenGLView, Core Animation backed
  • From: David Duncan <email@hidden>
  • Date: Wed, 30 Jan 2008 09:57:52 -0800

On Jan 29, 2008, at 7:35 AM, Richard Somers wrote:

Apple's LayerBackedOpenGLView sample code illustrates the sharing of OpenGL objects (textures, display lists, etc.) between the NSOpenGLView surface-backed context and the core animation layer- backed context. At least that is what the comments in the code seem to indicate.

Am I not understanding this correctly?


I believe my impression at the time that I wrote that was that he was trying to share resources between an NSOpenGLView and an arbitrary layer tree. Since you have no control over the context that an arbitrary render tree uses, you have no method to specify the share context unless you use the CARenderer - and even then, you don't have access to the resources that CA is going to use anyway, so I'm not certain there is much of a point.

There is an exception however, in that if your layer tree uses a CAOpenGLLayer, then you can and do get a chance to specify a CGLContextObj for each of them to use, in which case you can create your own CGLContextObj that shares with arbitrary contexts, allowing you to share resources between CAOpenGLLayers and other OpenGL renderering objects (like NSOpenGLView). But for non-opengl layer content, you still don't have access to the object IDs that Core Animation creates, so you can't really share them.

I'm not certain what the comment in the LayerBackedOpenGLView sample is referring to, as I didn't write it and am not familiar with what optimizations may be going on behind the scenes. But in terms of sharing OpenGL resources (textures, VBOs, FBOs, etc) you need the object ids, and you don't have access to them no matter what you do.
--
David Duncan
Apple DTS Animation and Printing
email@hidden




_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


References: 
 >Re: [Leopard] Creating shared NSOpenGLView, Core Animation backed (From: Richard Somers <email@hidden>)

  • Prev by Date: Re: Named image for regular folder?
  • Next by Date: Re: Named image for regular folder?
  • Previous by thread: Re: [Leopard] Creating shared NSOpenGLView, Core Animation backed
  • Next by thread: File's owner quetion
  • Index(es):
    • Date
    • Thread