ofMatrixMode causing distortion in the Projection Matrix

Hello all!

I’m beginner here and before posting I looked for similar topics, but I couldn’t find any.

I’m using OF (0.8.3) for rendering a simple 3D object over an AR marker.
When using the OpenGL function glMatrixMode(GL_PROJECTION) to set the projection matrix, everything works fine. However, if I use the OF version ofMatrixMode(GL_MODELVIEW) , as I move the marker away from the center of the camera, I get a crescent misalignment between the marker and the 3D object.

I also tried to use the ofSetMatrixMode(OF_MATRIX_PROJECTION) , but it’s even worse: the object moves in the wrong axis.

Is it a bug? Am I doing something wrong? Probably the second option, but I have no clue about how to set it properly.

Thanks in advance!