Skip navigation.
 
mlRe: Newbie Q: Is it possible to draw functional "Cocoa Controls" in an OpenGL context?
FROM : Scott Anguish
DATE : Thu Feb 15 00:00:47 2007

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 mailsAuthorDate
mlNewbie Q: Is it possible to draw functional "Cocoa Controls" in an OpenGL context? Matt Trinneer Feb 14, 22:33
mlRe: Newbie Q: Is it possible to draw functional "Cocoa Controls" in an OpenGL context? Daniel Steward Feb 14, 23:52
mlRe: Newbie Q: Is it possible to draw functional "Cocoa Controls" in an OpenGL context? Scott Anguish Feb 15, 00:00
mlRe: Newbie Q: Is it possible to draw functional "Cocoa Controls" in an OpenGL context? Daniel Steward Feb 15, 00:21
mlRe: Newbie Q: Is it possible to draw functional "Cocoa Controls" in an OpenGL context? Alastair Houghton Feb 15, 00:51
mlRe: Newbie Q: Is it possible to draw functional "Cocoa Controls" in an OpenGL context? Sean McBride Feb 15, 16:03