By rogerpala
on Wed, 06/20/2012 - 17:05
Hello I am trying to create a QualcommAR [URL=http://www.openframeworks.cc/]openframeworks[/URL] addon.
I'm trying to adapt the FrameMakers example.
Everything seems to work fine but the renderFrameQCAR method is not called and I get this log message:
[B]INFO: UIView does not conform to UIGLViewProtocol[/B]
the console look like this:
[CODE]2011-07-28 18:32:40.788 qcARTest[4865:707] QCAR OpenGL flag: 1
2011-07-28 18:32:40.792 qcARTest[4865:707] QualcommAR onCreate()
2011-07-28 18:32:40.795 qcARTest[4865:707] New status: 1
2011-07-28 18:32:40.799 qcARTest[4865:707] initApplication
2011-07-28 18:32:40.868 qcARTest[4865:707] New status: 2
2011-07-28 18:32:40.873 qcARTest[4865:6203] initQCAR
2011-07-28 18:32:40.889 qcARTest[4865:6203] INFO: QCAR SDK version 1.0.3
2011-07-28 18:32:40.886 qcARTest[4865:707] QualcommAR onResume()
2011-07-28 18:32:40.972 qcARTest[4865:707] INFO: UIView has CAEAGLLayer class
2011-07-28 18:32:40.996 qcARTest[4865:707] INFO: UIView does not conform to UIGLViewProtocol
2011-07-28 18:32:41.238 qcARTest[4865:6203] QCAR::init percent: 100
2011-07-28 18:32:41.247 qcARTest[4865:707] New status: 3
2011-07-28 18:32:41.250 qcARTest[4865:707] New status: 4
2011-07-28 18:32:41.255 qcARTest[4865:6207] loadTracker
2011-07-28 18:32:41.260 qcARTest[4865:6207] INFO: Tracker starts loading
2011-07-28 18:32:41.301 qcARTest[4865:6207] INFO: Found config.xml
2011-07-28 18:32:41.322 qcARTest[4865:6207] INFO: Found config.xml
2011-07-28 18:32:41.336 qcARTest[4865:6207] INFO: Tracker finished loading (no errors)
2011-07-28 18:32:41.346 qcARTest[4865:707] New status: 5
2011-07-28 18:32:41.348 qcARTest[4865:707] New status: 7
2011-07-28 18:32:41.350 qcARTest[4865:707] startCamera
2011-07-28 18:32:41.352 qcARTest[4865:707] configureVideoBackground[/CODE]
But if I am not missing anything i do actually implement the protocol.
I have a header that looks something like this:
[CODE]class ofxQualcommAR;
@interface QualcommAR : UIView {
@public
// OpenGL projection matrix
QCAR::Matrix44F projectionMatrix;
struct tagARData {
CGRect screenRect;
NSMutableArray* textures; // Textures
int QCARFlags; // QCAR initialisation flags
status appStatus; // Current app status
} ARData;
}
- (void)renderFrameQCAR; // Render frame method called by QCAR
- (void)onCreate;
- (void)onDestroy;
- (void)onResume;
- (void)onPause;
@end[/CODE]
And I have a .mm class where I implement the renderFrameQCAR method. The class looks pretty much the same as the EAGLView.mm in the FrameMarkers example but using OpenGL 1.1 and omitting all the context creation as openframeworks already has its own EAGLView and the context is already created.
So the idea is to create a UIView with all the AR rendering and then add this view to the openframeworks view that is already created.
Can anyone help me find out why the renderFrameQCAR method is not being called? AM I not implementing correctly the UIGLViewProtocol protocol? Am I missing something on the implementation of the class?
Any help will be much appreciated.
Thanks a lot and congrats for this great API.
/roger
p.s. I attach the classes in case it helps.
Re: renderFrameQCAR not being called
Re: renderFrameQCAR not being called
Re: renderFrameQCAR not being called
Re: renderFrameQCAR not being called
renderFrameQCAR not being called
Sorry but I didn't understand how you solved the issue, I'm still gettin this after restarting the viewcontroller for third time:
renderFrameQCAR not being called
renderFrameQCAR not being called
Glad you sorted the problem, and thanks for posting!
N