I finally tried building my app with the iOS 5 SDK, and have an issue with windows / subviews.
Previously, I added a overlay view to my scene in ARAppOSGDelegate's applicationDidFinishLaunching like this:
- Code: Select all
[window addSubview:viewController.view];
[window addSubview:hudController.view];
Here viewController is an instance of ARViewController, and hudController is my custom class. This worked fine, but as of iOS 5, I see the hudController view for only a fraction of a second, then the screen flashes white and the AR view appears over top. It seems like this is triggered by [ARView layoutSubviews]. It somehow pops up to the front, and hided my subview.
Does anyone have any idea what changed in iOS 5 that would cause this?
---
Also, in case anyone is interested, there were 2 issues that prevented me from even getting my app to build for iOS 5 in the first place:
1) The GCC 4.2 compiler is no longer bundled with XCode, so you have to switch to LLVM GCC 4.2. I first tried the default Apple LLVM compiler, but got a segfault when loading OSG dynamic libraries (something to do with dynamic_cast).
2) I had to modify one of the OSG include files: include/ios4/osg/BufferObject lines 84,85:
Changed:
- Code: Select all
typedef int GLintptr;
typedef int GLsizeiptr;
To:
- Code: Select all
typedef long GLintptr;
typedef long GLsizeiptr;