Projects
Discord
Events
Jams
Unwind
Conferences
Resources
Forums
Fishbowls
Podcast
Newsletter
About
Manifesto
About the Team
Log In
← Back to index
One Dimention or Multi for Matrices Arrays?
Mike
#6053
March 8, 2016
Not really sure which would be easier to work with. I think creating math functions would be a little simpler if passed a multi dimensional array, but I think openGL likes it's arrays flat? Not sure. Would appreciate some advice.
Mārtiņš Možeiko
#6054
March 8, 2016
"float a[4][4]" and "float b[16]" has the same layout in memory, as long as you are accessing b array correctly.
So OpenGL doesn't care about what arrays you use. As long as memory layout is correct, it will work fine with multi dimensional array.
Mike
#6055
March 8, 2016
Thanks
Reply to Thread
← Back to index