when i developed a demo use vuforia in my game, i found that QCAR::init() modify the SampleApplicationSession's member delegate,
@interface SampleApplicationSession ()
@property (nonatomic, readwrite) CGSize mARViewBoundsSize;
@property (nonatomic, readwrite) UIInterfaceOrientation mARViewOrientation;
@property (nonatomic, readwrite) BOOL mIsActivityInPortraitMode;
@property (nonatomic, readwrite) BOOL cameraIsActive;
// SampleApplicationControl delegate (receives callbacks in response to particular
// events, such as completion of Vuforia initialisation)
@property (nonatomic, assign) id delegate;
// Initialise QCAR
// (Performed on a background thread)
// Background thread must have its own autorelease pool
// QCAR::init() will return positive numbers up to 100 as it progresses
// towards success. Negative numbers indicate error conditions
NSInteger initSuccess = 0;
initSuccess = QCAR::init();
} while (0 <= initSuccess && 100 > initSuccess);
before called QCAR::init(); self.delegate has correct value, but after called QCAR::init() self.delegate has been changed.
i can not find what's the problem.
before init QCAR, i creat a glkview by myself, and create EAGLContext in that view controller,
does it OK?