Forum Discussion
ckoeber
12 years agoHonored Guest
Reading Sensor data with GLM and OpenGL ...
Hello, So I have my application ported to the rift using the SDK and I can read sensor data fine. It's calculating the sensor data and converting it over to GLM that is giving me problems. I...
cybereality
12 years agoGrand Champion
You should be able to access the underlying data structure to convert it to the format you need.
For example:
I found some code on StackOverflow that looks like it should allow you to create a glm::mat4 from an array,
Hope that helps.
For example:
l_ProjectionMatrix.M[0][0], l_ProjectionMatrix.M[0][1], ...
I found some code on StackOverflow that looks like it should allow you to create a glm::mat4 from an array,
float aaa[16] = {
1, 2, 3, 4,
5, 6, 7, 8,
9, 10, 11, 12,
13, 14, 15, 16
};
glm::mat4 bbb;
memcpy( glm::value_ptr( bbb ), aaa, sizeof( aaa ) );Hope that helps.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device