• Advertisement
Sign in to follow this  

Help,My puzzle about coordinate value in OpenGL

This topic is 4889 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

In my OpenGL,when I used coordinate value over 1.0,i always failed. for example: glBegin(GL_TRIANGLE) glVertex3f(0.0,0.5,0.0); glVertex3f(-0.5,-0.5,0.0); glVertex3f(0.5,-0.5,0.0); glEnd(); this ok,but glBegin(GL_TRIANGLE) glVertex3f(0.0,20.0,0.0); glVertex3f(-20.0,-20.0,0.0); glVertex3f(20.0,-20.0,0.0); glEnd(); won't work? Could somebody tell me why? thanks ~~~ ^_^

Share this post


Link to post
Share on other sites
Advertisement
yeah...you probably have problem with projection matrix or you have n't used glTranslatef() properly...

Share this post


Link to post
Share on other sites
Most likely, you are drawing too near to the near clipping plane. Try throwing in a:

glLoadIdentity();
glTranslatef (0.0f, 0.0f, -10.0f);

at the beginning of your drawing code.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement