I have a glm::mat4 matrix and I need to get the values into a double[16] array. Any ideas on how to solve this problem??
glm::mat4 pMat4; // your matrix
double dArray[16] = {0.0};
const float *pSource = (const float*)glm::value_ptr(pMat4);
for (int i = 0; i < 16; ++i)
dArray[i] = pSource[i];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With