ivansafrin/Polycode — pull request #46 by mcclure (2011-11-23 18:18:07+00:00)
Title: Audit xibs, disable 'one shot' setting on all windows containing OpenGL ...

...views.

Explanation: on a mac, take the Template project generated by building current top-of-tree Polycode. Then open that project and compile it. On my computer (XCode 3.2.6 on 10.6.8) it will succeed but emit a warning:

CompileXIB /Users/mcc/work/p/beth/PolycodeTemplate/en.lproj/MainMenu.xib
/Users/mcc/work/p/beth/PolycodeTemplate/en.lproj/MainMenu.xib:533: warning: NSOpenGLViews are not supported in windows with "One Shot" memory enabled.

What does this mean? The following page explains:

http://lists.apple.com/archives/mac-opengl/2010/Mar/msg00027.html

"One Shot Memory" is a checkbox attached to the information for a window in a nib/xib. It is normally an optimization. However, it should NOT be used if the window will contain an OpenGL view and in fact is potentially unsafe. Currently, there are several xibs scattered through Polycode which instantiate windows, the windows are one-shot and they contain OpenGL views. In this patch, I simply opened all the xibs and unchecked "one shot" where appropriate.

*By the way, in the process of doing this build I noticed I was editing files in the following directories. I am pretty sure these entire directories should NOT be checked into source control because they are build products of cmake, and should be removed.* But I'll leave it to you to do that in case there's something I'm missing:

Examples/C++/Build
Player/Build