- Sort Posts
- 4 replies
- Last post
GLKit
We use GLKit with Vuforia without problems.
To do so we have a GLKViewController with a GLKView. Inside the GLKViewController you have to override "- (void)update"-method (make sure to name it like this, Xcode won't autocomplete it for you) and inside this we call "renderFrame" on the GLKView instance, which is the same as the renderFrameQCAR in the samples.
When using GLKViewController you don't have to manage the buffers as in the samples, so you can safely remove all that code. Also make sure to look into GLKView/GLKViewController properties for managing OpenGL-stuff.
GLKit
The update method implementation, solely, does not solve the problem at all. According to Apple's documentation, it should be called just before a frame is rendered. But, if you don't have anything to render, it will be not rendered at all.
In fact, it is necessary to implement the view delegate method
func glkView(GLKView, drawIn: CGRect)
and render all in there. I have tried it, but with little success since Vuforia's documentation is arid as well as its sample, which are too old for modern iOS development. The samples were created before GLKit and integrating Vuforia with new technologies is being a pain.
All I'm getting for the background video is a blank black screen.
You are welcome to try using GLKit with Vuforia. GLKit was introduced in iOS 5 and the code in our samples was written at a time when earlier iOS versions were being supported. Code in the samples has been minimally updated as necessary to support core changes in the Vuforia and/or iOS APIs.