Cocoa controls on top of NSOpenGLView
Shouldn't it in theory be possible to place a standard Cocoa control on top of an NSOpenGLCiew? (Perhaps requiring core animation)
Interface builder certainly doesn't like it - all controls go immediately behind the NSOpenGLView.
Interface builder certainly doesn't like it - all controls go immediately behind the NSOpenGLView.
I would assume you could put them in another window, and set that windows level to be above the window that contains the NSOpenGLView.
You can either set the OpenGL context's level to be behind the window, thus the Quartz drawing would be in front of it, or, if you want less pain, and don't require backwards compatibility with 10.4, use CoreAnimation layers. I could've sworn there was a thread about this not so long ago.
This is what kCGLCPSurfaceOrder is for. Circa 10.2.
That's perfect. However, unless I'm missing something, I don't see any way to lay out my controls on top of the OpenGL view in IB. Anything I drop on top of the NSOpenGLView goes behind it.
Am I missing something simple or is that behavior simply not supported in IB and I should create my controls at runtime after setting kCGLCPSurfaceOrder?
Am I missing something simple or is that behavior simply not supported in IB and I should create my controls at runtime after setting kCGLCPSurfaceOrder?
IB doesn't let you set CGL context properties, and will float NSOpenGLViews on top.
I think you can still do all of the layout in IB, if you subclass a custom view.
I think you can still do all of the layout in IB, if you subclass a custom view.
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Nothing showing up in NSOpenGLView [newb] | binaryinsomnia | 6 | 4,871 |
Nov 29, 2011 07:04 PM Last Post: binaryinsomnia |
|
| Apple Controls in OpenGL | Talyn | 6 | 4,159 |
Feb 8, 2009 01:25 PM Last Post: Talyn |
|
| Antialiasing and NSOpenGLView attributes | Jar445 | 2 | 5,607 |
Jan 20, 2009 10:42 AM Last Post: maximile |
|
| Double-Buffering with NSOpenGLView | DesertPenguin | 3 | 4,792 |
Aug 1, 2006 07:17 AM Last Post: DesertPenguin |
|
| [NSWindow orderOut] from NSOpenGLView? | Fenris | 11 | 5,724 |
Jul 5, 2005 05:37 PM Last Post: AnotherJake |
|

