I am porting iOS opengl games to metal
Use metalangle https://github.com/kakashidinho/metalangle
I use pre-compiled dynamic library
Return nil when creating MGLContext
MGLContext * aaa = [MGLContext alloc];
aaa == nil
Why is that?
I thought alloc would return nil only when the memory overflowed
In modern ObjC, it is not well-defined to only call
+allocwithout then calling an init method:It was never a good practice, but you now cannot split up allocation and initialization.
That said, how are you testing this? I haven't been able to reproduce it so far. It is possible that
MGLContextitself isnil. That would happen if the dynamic library is weakly linked, and not present.