Sign in to follow this  

why the teapot not reversal?

This topic is 3738 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

the glOrtho function :if zNear is negative then the near clipping-plane( also observing plane) is behind the viewpoint and the object we see will be upside-down. but my demo contract with it. here, the viewpoint is (0.0, 0.0, 5.0),so i set the near clipping-plane's z=6, but the result is same as the ones that set the near clipping-plane's z=-0.5.. why not upside-down? thank you void glOrtho( GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar ); **************my demo******************** void display(void) { glClear (GL_COLOR_BUFFER_BIT); glColor3f (1.0, 1.0, 1.0); glLoadIdentity (); /* clear the matrix */ /* viewing transformation */ gluLookAt (0.0, 0.0, 5.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0); glutWireTeapot(0.5);//the object to display glFlush (); } void reshape (int w, int h) { glViewport (0, 0, (GLsizei) w, (GLsizei) h); glMatrixMode (GL_PROJECTION); glLoadIdentity (); glOrtho(-1.0,1.0,-1.0,1.0,-6.0,20.0); glMatrixMode (GL_MODELVIEW); } [Edited by - sunrisefe on September 17, 2007 3:23:46 AM]

Share this post


Link to post
Share on other sites

This topic is 3738 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this