Re: 10.2 Quartz over OpenGL? (window shadow on underlay?)
Re: 10.2 Quartz over OpenGL? (window shadow on underlay?)
- Subject: Re: 10.2 Quartz over OpenGL? (window shadow on underlay?)
- From: "Kenneth C. Dyke" <email@hidden>
- Date: Sun, 25 May 2003 11:02:12 -0700
On Friday, May 23, 2003, at 07:51 AM, arekkusu wrote:
Found this discussion in the archives, have a related question...
Joshua Davis wrote:
Thanks for your efficient help. For the benefit of future readers, you
can get an NSView to draw over an NSOpenGLContext by placing the
OpenGL
surface beneath the view's window and then making the window
non-opaque. (That's my understanding, anyway.) This is how an
NSOpenGLView would do it:
long negativeOne = -1;
[[self openGLContext] setValues:&negativeOne
forParameter:NSOpenGLCPSurfaceOrder];
[[self window] setOpaque:NO];
You do not need to call -setAlpha: on the window. 1.0 alpha is fine,
apparently.
My problem is, my GL view fills part of the window horizontally edge to
edge.
After I place it under the 2D view, and fill the 2D view with
clearcolor, the next time my window shadow is invalidated (bringing
another app to the front, for instance) there is a gap in the shadow
where the GL view is.
This makes sense if the window manager is calculating the shadow based
only on the 2D quartz content's alpha, but it's not what I want.
Is there any way to keep a normal shadow behind GL content?
Another way around the whole issue would be to use a child window to
draw your 2D content over GL, which won't have this problem. See the
OpenGL ChildWindowDemo for an example of this.
-Ken
Kenneth Dyke, email@hidden (personal), email@hidden (work)
Sr. Mad Scientist, MacOS X OpenGL Group, Apple Computer, Inc.
C++: The power, elegance and simplicity of a hand grenade.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.