FROM : Daniel Steward
DATE : Thu Feb 15 00:21:59 2007
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. 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 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? I could see where maybe if the glContext renders
asynchronously it could draw over buttons that were on top.
On Feb 14, 2007, at Wednesday4:00 PM, Scott Anguish wrote:
>
> On Feb 14, 2007, at 5:52 PM, Daniel Steward wrote:
>
>> NSOpenGLView doesn't allow subviews but you could certainly put an
>> NSView on top of your OpenGL view and put buttons in there. You
>> could subclass that view to pass mouse clicks that weren't handled
>> by buttons in the top view down to the OpenGL view.
>
>
> We recommend against overlaying views like this in the documentation.
>
> Right now the best solution is using an invisible floating window
> with the controls that overlaps the OpenGL window. I think there
> is an example of this on developer.apple.com
>
>
DATE : Thu Feb 15 00:21:59 2007
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. 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 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? I could see where maybe if the glContext renders
asynchronously it could draw over buttons that were on top.
On Feb 14, 2007, at Wednesday4:00 PM, Scott Anguish wrote:
>
> On Feb 14, 2007, at 5:52 PM, Daniel Steward wrote:
>
>> NSOpenGLView doesn't allow subviews but you could certainly put an
>> NSView on top of your OpenGL view and put buttons in there. You
>> could subclass that view to pass mouse clicks that weren't handled
>> by buttons in the top view down to the OpenGL view.
>
>
> We recommend against overlaying views like this in the documentation.
>
> Right now the best solution is using an invisible floating window
> with the controls that overlaps the OpenGL window. I think there
> is an example of this on developer.apple.com
>
>
| Related mails | Author | Date |
|---|---|---|
| Matt Trinneer | Feb 14, 22:33 | |
| Daniel Steward | Feb 14, 23:52 | |
| Scott Anguish | Feb 15, 00:00 | |
| Daniel Steward | Feb 15, 00:21 | |
| Alastair Houghton | Feb 15, 00:51 | |
| Sean McBride | Feb 15, 16:03 |






Cocoa mail archive

