PDA

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



John Jenkins
10-16-2002, 10:48 AM
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?

nexusone
10-16-2002, 11:03 AM
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).]

John Jenkins
10-16-2002, 11:21 AM
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?

John Jenkins
10-16-2002, 12:40 PM
Do I need to change to view matrix? I am trying everything.

John Jenkins
10-16-2002, 12:43 PM
I figured it out.......

nexusone
10-16-2002, 04:34 PM
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?