Keeping track of vecor that is parallel to screen horizontal and vertical??

I want to move the mouse horizontally and rotate my model about the model matrix vector that is parallel to the screen view…

I think I need to keep track of the up vector throughout my rotations. I am havin trouble with this though. Does anyone one know if this is the way to do this, or can help??

I can actually get it to work if I do only one rotation say just about the x or just the y by using these vectors:
upvect[0]=0.;
upvect[1]=cos(yrot3.14159/180.);
upvect[2]=sin(yrot
3.14159/180.);

	rgtvect[0]=cos(xrot*3.14159/180.);
	rgtvect[1]=0.0;
	rgtvect[2]=-sin(xrot*3.14159/180.);

but if i try to mix x and y rotation things get all mixed up.

[This message has been edited by delic (edited 10-27-2002).]

modelview matrix data 2,6,10 is the view direction (or the inverse)

at first i didnt know what you meant… then i figured out that you can:
GLfloat curmatrix[4][4];
glGetFloatv(GL_MODELVIEW_MATRIX,&curmatrix[0][0]);

Damn, as u can see im a newbie.

[This message has been edited by delic (edited 10-29-2002).]

at first i didnt know what you meant… then i figured out that you can:
GLfloat curmatrix[4][4];
glGetFloatv(GL_MODELVIEW_MATRIX,&curmatrix[0][0]);