As explained in the cited thread, you've to break OpenGL's computation of the MODELVIEW matrix, intermediately perform the computation of the world matrix, and then continue the MODELVIEW matrix by multiplying with the world matrix.
An outline looks like this:
glLoadIdentity();// do here all transformations of the camera as usual// at this point, the MODELVIEW matrix consists of nothing but the VIEW portionglPushMatrix(); // create a (temporary) matrix that can be overwritten nextglLoadIdentity(); // initialize temporary matrix as identity matrix// do here all transformation of the model as usual// at this point, MODELVIEW has an identity VIEW portion and the wanted MODEL portion, ...// ... so it shows a pure local-to-global transformationGLfloat model[16];glGetFloatv(GL_MODELVIEW_MATRIX, model); // read the model's world matrix// at this point the "model" variable contains the wanted world matrixglPopMatrix(); // remove the temporary matrixglMultMatrix(model); // complete the MODELVIEW matrix// at this point the MODELVIEW matrix is the product of the original VIEW portion ...// ... and the model's world matrix// do here the rendering of the model
The shown method is not meant to be optimal. E.g. it may be better to isolate the world matrix computation and perform it (for each model) before entering the rendering loop.