Original Post
Hi everyone, I have a program where the user can rotate and translate around an OpenGl model as well as zooming. I have a reset view button which cancels all of these by reseting the model view matrix. I wish to add a "fit" button which moves the model to the centre of the viewport and sets the zoom so that it fills the viewport but does not change the rotation of the model. I'm not sure how to do this, I have experimented with: gluLookAt(0,0,0,m_contentCentre[0],m_contentCentre[1],m_contentCentre[2],0,1,0); but I cannot get this to work. Can someone please tell me the best way to achieve this. Thanks in advance, Rob