View Full Version : Difference between GLKMatrix4Translate and GLKMatrix4MakeTranslation

11-08-2013, 11:49 AM
I understand the idea behind a translation, including the math. What I don't understand is how these two functions differ from one another. I think that GLKMatrix4Translate is the same as a (4x4)*(4x4) matrix multiplication. But what is the GLKMatrix4MakeTranslation? When I test these two functions in my code, I get different results, so there is clearly a difference (or else there wouldn't be two different functions), but I don't understand what that difference is.

Would somebody mind enlightening me? Thank you! :confused:

carsten neumann
11-09-2013, 02:04 AM
One makes a translation matrix (i.e. a matrix that represents a translation by the given vector), the other combines a translation with a given matrix and returns the combined matrix - see also the reference docs (https://developer.apple.com/library/ios/documentation/GLkit/Reference/GLKMatrix4/Reference/reference.html).