openglonmetal / MGL

OpenGL 4.6 on Metal
Apache License 2.0
781 stars 30 forks source link

add CMakeLists.txt and few tweaks. compiles but get runtime error #41

Closed dokipen3d closed 2 years ago

dokipen3d commented 2 years ago

This is to start the discussion on getting a working version of a build using CMake. This PR has a working build.

The goal of this is so that I can get up and running to start to contribute to the library. I can't get the xcode project to build so I thought I would go with what I'm familiar with and get a cmake setup going.

This currently can compile the library from the in tree (or installed) dependencies and build the test_mgl application. There is a runtime error however when the Command buffer is committed in MGLRenderer.m L:3002. I'm hoping to pick up some objective c again (its been about 15 years since I last touched it) so I can debug these issues more easily.

Current theorising is that I have something wrong with the compilation mode (objective-c vs objective-c++) or are not linking something like a needed framework correctly. I'm hoping I can collaborate with others and figure this out.

Thanks Dan

dokipen3d commented 2 years ago

I'll be closing this PR and opening up a new one soon