Re: Textures Alpha blending problems with Transparent NSOpenGLView
Re: Textures Alpha blending problems with Transparent NSOpenGLView
- Subject: Re: Textures Alpha blending problems with Transparent NSOpenGLView
- From: Erik Buck <email@hidden>
- Date: Wed, 26 Sep 2007 10:41:48 -0700 (PDT)
The first problem is that overlapping views are not supported unless on ov the views is a sub-view of the other. What you are doing won't work right with all Quartz views and using an NSOpenGL view doesn't improve the situation.
The second issue is that NSOpenGLView is just drawing into the window backing store for the containing window. When a non-opaque view draws in a window, the drawing is composited with whatever else is in the window backing store. That explains what you see.
The solution is to use a transparent child window to contain your NSOpenGLView. Then the Quartz compositor which takes care of compositing all windows into the screen's frame buffer will be able to do the right thing. By virtue of being in its own window, you NSOpenGLView will not have to share its window's backing store.
Apple has thoughtfully provided example applications that do what your seem to want. Search for one at developer.apple.com.
_______________________________________________
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