Is it possible to overlay NS- controls on top of OpenGL?
In iOS development it's possible to overlay UIcontrols on top of a EAGLView, which basically makes you have interface controls on top of openGL.
I tried to achieve something similar with OSX development but it seems like the OpenGLView object is being drawn on top of everything regardless of its position in InterfaceBuilder.
In essence Im trying to show some OSX controls (buttons, sliders, etc..) on top of an OpenGLview. How can this b开发者_如何转开发e done?
I believe you may need to turn on layer-backed views (setWantsLayer:YES in code; a switch in the Core Animation properties in IB) for the controls you wish to layer and possibly the view containing the whole thing (the superview of the OpenGL view).
Also keep in mind controls that draw backgrounds, bezels, etc. You may need to configure each control to make sure it draws no backgrounds; buttons shouldn't use "momentary light" mode, etc.
精彩评论