I’m wanting to fiddle around with OF and ofxARkit but when compiling xCode gives the following error:
2018-12-14 00:32:07.908845+0200 tracAR_1[4033:684945] -[MTLRenderPipelineDescriptorInternal validateWithDevice:], line 2395: error 'vertexFunction must not be nil.'
-[MTLRenderPipelineDescriptorInternal validateWithDevice:]:2395: failed assertion `vertexFunction must not be nil.'
As a test I’ve just compiled my generated project with all code from the ‘example-basic’ that comes with ofxARkit. Because of the error I’ve tried to fix all differences between the files but can’t seem to get to the right fix.
Wonder if there is somebody out there that can help me fix this, as it doesn’t seem to be part of the code itself but more of some setting somewhere in xCode. For the sake of being able to try my exact compile I’ve pushed everything to github: https://github.com/RobbertGroenendijk/tracAR_1
So I eventually solved the problem just replicated it in order to clearly show how to solve this error. It’s actually communicated on the ofxARkit wiki on Github but in a way that might not be clear to everyone if you haven’t been working in Xcode much.
When creating a new project, the .metal file that contains the shader for processing the camera image is for some reason, marked as a data file instead of a metal shader source. Also, the file is not included in the list of compiled sources. You’ll have to change how XCode views that file as well as add it to the list of compiled sources.**