recp / cglm

📽 Highly Optimized 2D / 3D Graphics Math (glm) for C

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Swift Package with cpp interop for original GLM library

masters3d opened this issue · comments

hi,
now that swift has support for cpp interoperability, I am curious if anybody knows of a swift package version of the https://github.com/g-truc/glm?

You should look for another mathematics library... Preferably this one!

GLM in its present state is barely maintained. "Recent" changes (as of 2021) have broke backwards compatibility. Even more recent changes (Nov 8th) have put the upstream version of the library into an unusable/uncompilable state.

Ever since the issues section was removed from that repository it has become incredibly difficult to track all of the bugs present in that library (and there are many of them).

cglm has Swift Package :) Also in the future, cglm may add basic C++ operations like operator overloading ( +=, *=, `-= ) and some other helpers to struct types if target is C++. In this case cglm may take advantage of C++ interop with Swift too.

For now cglm provides cglm/applesimd.h to make it easier to convert cglm -> Apple's simd. Since alignment requirements may be different conversion like this is required I guess.