heyx3 / Bplus.jl

A modern OpenGL 4.6 rendering framework, written in Julia.
Other
69 stars 3 forks source link

Replace our Vec overload of `Base.unsafe_convert()` #73

Open heyx3 opened 12 months ago

heyx3 commented 12 months ago

Instead of unsafe_convert-ing a Vec to a Ptr, we should take advantage of ContiguousRef by overloading Ref(::VecT{T}) to return a ContiguousRef{T}.

In theory, all the current C interop that passes in Vec data should continue to work, making this a small ticket. In practice, if things don't Just Work, then this becomes a medium-size issue.