I am drawing using two viewports and want to rotate one viewport and not the other.

How can I translate in and out and rotate in one viewport without doing the same to the other. I have tried pushmatrix and popmatrix. I am using the glprint function I got from the NEHE turorial. Also my program is really picky on where I place the raster and glprint commands. Does anyone have any ideas?

How are you creating your view ports?

A good example of using view ports is the glut tutor on Nate Robins web site:
http://www.xmission.com/~nate/opengl.html

Originally posted by John Jenkins:
How can I translate in and out and rotate in one viewport without doing the same to the other. I have tried pushmatrix and popmatrix. I am using the glprint function I got from the NEHE turorial. Also my program is really picky on where I place the raster and glprint commands. Does anyone have any ideas?

[This message has been edited by nexusone (edited 10-16-2002).]

Well I am calling glviewport the only way I know how. I just call it and give it the parameters for length height and lower left corner position. When I push pop matrix for the viewport I want to rotate, the other viewport does not even draw. Sometimes the viewport will draw what it is supposed to and sometimes it draws nothing depending on where I call the viewport function. Also I am looking at the link you told me about. Does he have viewports that he can rotate independently?

Do I need to change to view matrix? I am trying everything.

I figured it out…

Yes, in his example he has I think three or four view ports. Each with a diffrent view of an object.

Originally posted by John Jenkins:
Well I am calling glviewport the only way I know how. I just call it and give it the parameters for length height and lower left corner position. When I push pop matrix for the viewport I want to rotate, the other viewport does not even draw. Sometimes the viewport will draw what it is supposed to and sometimes it draws nothing depending on where I call the viewport function. Also I am looking at the link you told me about. Does he have viewports that he can rotate independently?