no, that’s not the same.
if you translate by direct modification of the translational part of the modelview, you will translate in a coordinate frame aligned with the eye-space.
instead, if you multiply the current modelview matrix by a translation matrix, you’ll get your translation operate into object-space.
Depends on how you organize your matrix. But it’s correct, when he sets the values 12, 13 and 14 in the array he gets from openGL. This is the translation vector. So OpenGL organizes it column-based in this array.
I alter my matrix the same way. I have to rotate a part on the screen with my mouse.
I achieve this by multiplying the rotationmatrix of my delta rotation in this from on the existing rotation. For this I read out the matrix from openGL, multiply it with my own matrix and then give it back to openGL.
What I wanted was an algorithm that will take a modelview matrix and a xyz translation, and translate the modelview matrix. I just want to work with the matrix and translation numbers, not with the current matrix or gl functions or any of that.
Would it be creating a translation matrix as John said, and then post-multiplying the modelview matrix by the new translation matrix? I already have a function that multiplies to matricies together.
procedure OogleMatrixTranslate(var m: OOGLE_MATRIXF; x, y, z: Single);