<div dir="ltr"><div><div><div><div>I have an array of matrices where the matrix type is defined as <br><br></div><span style="font-family:monospace,monospace">typealias Vec4 = (Float, Float, Float, Float)<br></span></div><span style="font-family:monospace,monospace">typealias Mat4 = (Vec4, Vec4, Vec4, Vec4)<br><br></span></div><span style="font-family:monospace,monospace">let matrices:[Mat4]</span><br><br></div>I need to send them to an OpenGL API that accepts a buffer of <span style="font-family:monospace,monospace">Float</span>s. How do I do this? <span style="font-family:monospace,monospace">withMemoryRebound(to:_:)</span> requires the source type and the destination type to be the same size,, while each <span style="font-family:monospace,monospace">Mat4</span> is 16 times the size of <span style="font-family:monospace,monospace">Float</span>.<br></div>